convert orientation vec3 to a rotation matrix

Posted by lapin on Game Development See other posts from Game Development or by lapin
Published on 2012-12-10T02:58:39Z Indexed on 2012/12/10 5:19 UTC
Read the original article Hit count: 334

Filed under:
|
|
|

I've got a normalized vec3 that represents an orientation.

Each frame of animation, an object's orientation changes slightly, so I add a delta vector to the orientation vector and then normalize to find the new orientation.

I'd like to convert the vec3 that represents an orientation into a rotation matrix that I can use to orient my object.

If it helps, my object is a cone, and I'd like to rotate it about the pointy end, not from its center :)

PS I know I should use quaternions because of the gimbal lock problem. If someone can explain quats too, that'd be great :)

© Game Development or respective owner

Related posts about math

Related posts about matrix