I've been struggling to calculate the rotationX, rotationY and rotationZ (CSS transform
) from origin to a point in 3d space. The 3d point can be seen as a vector with the length 1
starting from origin (0,0,0) to (x,y,z)
. I'm basically trying to calculate the pitch, yaw and roll of a vector.
It's similar like the unit circle with a third dimension. But instead of the angle t
, I'm looking for the rotation around each axis unit circle
I've been trying this solution but I seem to miss something: How to convert direction vector to euler angles?
Thanks,
Eric