PDA

View Full Version : moving object in circle across of other object



openGLWriter
11-19-2015, 08:18 AM
Hello,
iŽam new in OpenGL.
I wanna move sphere in circle of my cube.
Y-Axis will not be changed, but x and z.
So i tried to change x and z to minus or plus, but it moves like a line and not like a circle.

In the timer-method i register my animate-method:


glutTimerFunc(1, Animate, 0);

And within Animate i add or substract x and z.
How could i achieve moving in circle like a moon across earth???

Thx for the Help :)