Object Movement

Hey Everybody,

i`ve got a problem. I have implemented with vertex arrays a small object, a cuboid.
And i am able to let it fly. But there is the problem that my object wont turn its nose to the direction that is pressed.

For example the cuboid should turn to the right. Its moving to the right, but the object itself isnt turning.
So it should move like a car.
How can i achieve that?

Well I am achieving that its turning, but my programm doesnt know where the front of my object is.
I dont konw how to get it that always the “nose” is pointing to the direction into which the object is moving.

Please help

Would be very very grateful

Thanks

You need to know how much to turn the object in order to turn it. If it is moving along curved paths, then something is storing the angle at which the object is moving. Using that angle, at minimum, should help you to use something like glRotatef to rotate the cuboid.