PDA

View Full Version : moving objects



ankur2000
05-02-2005, 11:09 AM
Hi,

I want to move a 2D square, according to some inputs from the user like the x,y velocity . How do i do it ?

mikael_aronsson
05-02-2005, 11:40 AM
When you get user input, update some variables to keep track of the position and tell the OS to update the contents of the window, and in your rendering code, render the object at the correct position depending on the variables, you might want to have a peek at some OpenGL tutorials also.

Mikael