Code: Select all
InnerLib::vector3f vDirection1, vDirection2;
InnerLib::quaternion4f q;
q.rotationFromTo( vDirection2, vDirection1 );
q.makeInverse();
Rotate( q ); // Do the actual rotation
So my goal here is to figure out the rotation that needs to be applied to vDirection2 so that it is oriented the same as vDirection1, i then want to do that rotation( but the Rotate function does other things as well, hence my need to actually know that rotation amount ).
Any help would be great suggestions on what i might be doing wrong, or other ways to calculate this, currently i get what seem like gimbal lock issues.