Skip to main content
gamedev.net
🔒 Locked

Rotate a vector

Started by OleKaiwalker Sep 1, 2003 at 10:45 AM 0 replies 350+ views
Original Post
OleKaiwalker
OleKaiwalker
Hey, I''m working on a way to position moveable objects in a FPS game, and I would like to know, how to rotate a vector with the parsed in quaternion(0 <- x, 1 <- y, 0 <- z, 10 <- angle). I know it propably would be faster to create the object in object space and just use glTranslate and glRotate for the movement, but then I can''t use it properly with collision detection and per-pixel lighting.
The Great Sephiroth
The Great Sephiroth
The way I have been told to do this and have done it a few times, was to move the object''s center to 0, 0, 0, rotate it on each axis however you like, then move the object center back to it''s original location. Then youc an do your lighting and detections!


-The Great Sephiroth
-The Great Sephiroth

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.