independent object in environment

You guys and girls helped out a lot for my last question, hopefully you all can help me out again! I have an object inside a sphere (a world) by using nested transformations. But how do I get the object to move independently of the world? How do I rotate the object without rotating the whole world?


You have to use glPushMatrix() and glPopMatrix() to have this object independent. Simply do this:


[Here rotate&move your object and draw it]


Pushing transformation matrix to the heap
will effect in having NULL trans. matrix
so then obejct will look like his moves are independent. Thanks to popping the trans. matrix you can continue your work with other objects.

see ya

[This message has been edited by kyokpae (edited 11-29-2000).]