Skip to main content
gamedev.net
🔒 Locked 🎮 Unity

Object rotation matrix

Started by R3D 0 replies 350+ views
Original Post
R3D
R3D
I've got a flight type camera (pitch,yaw,roll) using glLootAk(). The eye is rotating around the target location. From the camera I have the following known values: - Vector3 pos_eye - Vector3 pos_target - Vector3 up (-1 to 1) - Vector3 forward (-1 to 1) - Vector3 right (-1 to 1) I'm trying to rotate an object at the camera pos_target location so I always will be looking at the rear of the object. glRotate() did seem not very usable for this kind of rotation, so I'm trying to use glMultMatrixf() for the object rotation, based on the camera values. But I can't seem to figure out how to construct a matrix/quarternion from these known values. How would I start to construct a matrix/quarternion from these values? Thanks at front.

Topic Locked

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

Sign in to reply to this topic.