• Advertisement
Sign in to follow this  

How to rotate an object while keep others unchanged?

This topic is 3939 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

I need to make a 3D Scorched Earth game and the player must be able to adjust the angle of the cannon(rotate up/down), obviously the landscape cannot rotate at the same time, but I don't know how to rotate one thing while keep others unchanged, please help me.

Share this post


Link to post
Share on other sites
Advertisement
It's all to do with the Order you apply you matrixs in....

i.e.

LoadIdenity();
RotateCamera
MoveCamera
PushMatrix();
Move Turrent/Tank Body
PushMatrix();
Rotate Turrent
PopMatrix();
PopMatrix();

Thats a basic theory anyway....

Rob:-D

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement