Sign in to follow this  
Olnex

How to rotate an object while keep others unchanged?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this