OpenGL Tomb Raider Style Rotation
Hi, Im making a first person Soccer game using OGL..
The game is at a stage where I can run around the field, however presently it is in QUAKE (tunnel vision) mode. I would like to have the player visible just in front of the screen, just like in Tomb Raider. Hence I need to have the world rotate around a ''y'' axis which needs to be just in from of the camera.
How can I move the y-axis forward?? or should I just move the camera view back along the z axis??
Thanks for your time,
Pointed
In my flight sim I use a -Z value (and a small +Y up value) to place the pov behind the airplane. The resultant coordinates are then translated and rotated. This retains the coordinates of the main object, airplane or player, to interact with other objects.
Good luck with the soccer game - it sounds ambitious!
Good luck with the soccer game - it sounds ambitious!
glTranslatef(0.0f,distance_from_player,0.0f); //to translate infront of the player
glRotate3f(angle_measure,0.0f,1.0f,0.0f);//to rotate around the y axis.
Is that what you were looking for?
JoeMont001@aol.com
glRotate3f(angle_measure,0.0f,1.0f,0.0f);//to rotate around the y axis.
Is that what you were looking for?
JoeMont001@aol.com
Hi Pointed,
I would say you''re better trying looking for a doc on Rotation using quadradic". This is the type of rotation used in Tomb Raider or in any good "Third person view"
lowrad
I would say you''re better trying looking for a doc on Rotation using quadradic". This is the type of rotation used in Tomb Raider or in any good "Third person view"
lowrad
I think what lowrad is actually trying to say is to use "quaternions" for your rotations. You will not be able to get smooth interpolations of your camera rotations without them.
(unless you fix the x-axis rotation to a static angle).
(unless you fix the x-axis rotation to a static angle).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement