   Moving objects with OpenGl
  I am trying to write a simple game with OpenGL where panels with openings come up from the bottom of the screen and the user controls a ball at the top and has to guide the ball through the openings or else get smashed at the top of the screen.  Its called falldown or something like that.  Well the actual question is how do I move the ball around the screen without moving the camera.  As is now, I am using the glTranslatef() command but when I place other things in the scene, they all move around too (which I undertand why they do).  What other functions are there for movement of individual objects because the only thing I want the user to control is the ball.  Thanks in advance!j_fish_ 
  glPushMatrix();glTranselatef(...);//draw your ballglPopMatrix();now only the ball is translated.  typically you store a matrix for each object in the scene and draw it wrapped in glPushMatrix()/glPopMatrix() calls.  they do just what they say, they push a matrix onto the openGL matrix stack so that you can pop it off without changing the underlying camera transforms done by gluLookAt(...) or whatever you are using to set the camera matrix.[EDIT: btw, if you're playing around with openGL for the first time the NeHe tutorials (http://nehe.gamedev.net) are pretty good.  and ALWAYS look up problems in the openGL bible, The Red Book http://fly.cc.fer.hr/~unreal/theredbook/)]-me   [edited by - Palidine on March 23, 2004 6:34:49 PM];  Hey thanks for the tip I''ll give that a try.  I appreciate the speedy responses around here!  Hopefully sometime I''ll be able to help someone too.  Thanks again.j_fish_ ;  You are doing it right.  It is just that glTranslate is just like glRotate or glScale (or almost anything else) in that it will modify the matrix OpenGL is using for transformation.  So all subsequent objects will go through the same transformations.If everything in your game is in real world coords except the ball, then draw all of that first, then glTranslate, then draw the ball.  Alternatively, you can save the matrix state before the translation (glPushMatrix) then restore it afterward (glPopMatrix).  Or, you could do the (almost) same thing by doing a glTranslatef in the opposite direction (i.e. -dx,-dy,-dz).  This is less stable, but won''t be noticible for just a few objects.   lonesockPiranha are people too. 