enigma
05-18-2007, 02:53 PM
Hi! :)
I' ve a problem with the control of movements. I work with OpenGL and GLUT. In my application, i have a sphere and i move this on X axis with glTranslate() function. The function have these parameters:
glTranslatef(xRef,0.0,-8.0)
xRef is set up to 0.0f, and is increased of 0.1f when a key is pressed. All this in a keyboard control function (called by glutSpecialFunc()).
When i press a key, the sphere moves on x axis and he stop immediately.
I want obtaining an "decelerate" effect. When i press a key i want start the sphere movement... but with a decelerate stop effect and not with an stop immediate...
Sorry for my bad english :(
Thanks!
I' ve a problem with the control of movements. I work with OpenGL and GLUT. In my application, i have a sphere and i move this on X axis with glTranslate() function. The function have these parameters:
glTranslatef(xRef,0.0,-8.0)
xRef is set up to 0.0f, and is increased of 0.1f when a key is pressed. All this in a keyboard control function (called by glutSpecialFunc()).
When i press a key, the sphere moves on x axis and he stop immediately.
I want obtaining an "decelerate" effect. When i press a key i want start the sphere movement... but with a decelerate stop effect and not with an stop immediate...
Sorry for my bad english :(
Thanks!