Hi at all,
I just tried to control a space ship (3D physics) via
SetObject3DPhysicsLinearVelocity( objID, dirX, dirY, dirZ, initialSpeed )
The problem is, that dirX, dirY and dirZ are coordinates in the global coordinate system. So the velocity direction is dependant on the ship's euler angles.
As far as I read the manual, there is no command to get an object's current "looking direction", so I need to transform the three euler angles to a (normalized) 3D-Direction (x, y, z).
There are lots of formulas on the web, but I don't know the exact axis convention of AppGameKit to choose the right one.
Thanks in advance,
Sandwich