View Full Version : rolling two balls + reflection

04-09-2001, 08:58 PM
I got a problem when I trying to add another ball which also suppose have reflection in the table in the NeHe's tutorial lession 31 for reflection. I made the first ball rotate along X, Z axises, it is all fine.
but when i add the second ball. following the first one, it just always rotate around the first ball like base on the new coordinate X,Z, Y axises.
then I have no idea how to handle the second ball seperately without effect by the first one.
any one can give me some hints?
thank you very much

--- lf

04-10-2001, 04:50 AM
You just need to push and pop matricies before and after you do your stuff for each ball. like this:
do stuff here for first ball
do stuff here for second ball

done http://www.opengl.org/discussion_boards/ubb/smile.gif

04-10-2001, 07:05 AM

It works!.... http://www.opengl.org/discussion_boards/ubb/smile.gif

thanks a lot!