Rotate vectors in 3D

Hello, I may not have the exact solution, but you may find a simple workaround using these few lines of code:

Say you want to rotate something to face a normalized vector, v

rotateY(atan2(-v.x,-v.z));
rotateX(asin(-v.y));

works great for images that always face the camera

2 Likes