Object 3d Rotation

Started by bigfishcatcher, April 07, 2008, 05:27:18 PM

Previous topic - Next topic

bigfishcatcher

I am working on a network racing game where the track goes up and down as well
as left and right.

I am also trying to do my own work on how to rotate the car.

The problem is when the car starts down a hill the Z axis is changed to make the car look like it
is going downhill (works fine)

but after you turn a curve the car starts rolling in what should be the X axis not the Z axis

Any ideas??

Thanks
Gary

EgonOlsen

You can try to rotate it around the axes in its own coordinate system, i.e. instead of doing a rotateZ() do a rotateAxis(car.getZAxis()). That might help with this particular problem.

bigfishcatcher