Posted By: PadMalcom
Algorithm behind vec_rotate - 10/22/17 13:15
Hi, I've been searching for a way to rotate a vector as vec_rotate does it. Now I'm too curious to see the algorithm behind it. Can you explain it briefly?
Posted By: Kartoffel
Re: Algorithm behind vec_rotate - 10/23/17 08:58
I guess it's three consecutive "2d" rotations (pan rotates xy, tilt xz, and roll yz). I'm not sure in which order they are performed, though.
Posted By: jcl
Re: Algorithm behind vec_rotate - 10/23/17 11:23
Yes, that's the algorithm. The angle is converted to a rotation matrix, with which the vector is then multiplied.