easy way for movements in 3D space?

Hello!

Is there any OpenGL Function to create movements in a 3D space. For example by pressing the up-key the object moves into the screen and therefore gets smaller? Or do i really have to deal with math?

Thanks

Erm - simple movements like that are, well, simple. If you have a fixed camera, looking down one of the 3 coordinate axis, you simply translate all of your objects in space, towards or away from you. If you use gluLookAt', you can of course move yourcamera’ and achieve the same effect.

That is called Perspective view, object just like in real life get smaller as they move away.
The is no math needed, it is all done in openGL.

But moving the object you will have to deal some with math as to location.

To move the object away from you, translate the object on the Z-axis.

code sample:

if (key == “UP_ARROW”) z–; move z into the screen

Originally posted by Clouddancer:
[b]Hello!

Is there any OpenGL Function to create movements in a 3D space. For example by pressing the up-key the object moves into the screen and therefore gets smaller? Or do i really have to deal with math?

Thanks[/b]

Thank you guys!
This will surely help me out

Thanks again!

Originally posted by Clouddancer:
[b]Thank you guys!
This will surely help me out

Thanks again![/b]

I have a problem. When I translate an object it deforms when I move near the bords.

I have a problem. When I translate an object it deforms when I move near the bords.

you may have your projection messed up. post your code for setting up your projection.

[This message has been edited by coredump (edited 09-18-2002).]