Archived

This topic is now archived and is closed to further replies.

Moving in to the direction of the camera in 3D

This topic is 5508 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, so after you told me to inplement quaternions i did so. Now I am at the same problem where to move in 3D? I got my Quaternion representing the camera direction. So know how can I extract the info from the Quaternion in which direction i should "move" if the player set the throttle of my spaceship. so the rotation is okay now there is no gimbal lock anymore. I think of something like taking the verctor i am looking to and ad it to my position vector scaled by a factor that i have to balance out. but which values reperent the camera-Vector? and is this vector looking the same way the camera does? please help I am stuck with this move-thing to long now :-( thank you 3D-Game Gurus

Share this post


Link to post
Share on other sites
You can find code all over the place to convert a quaternion to a rotation matrix. Multiply your basis vectors (1,0,0) (0,1,0) (0,0,1) by this matrix to get the camera direction.

Share this post


Link to post
Share on other sites