hi, i have a player that i would like to change to a rigid body but have to change the movement code to do this as dbMoveObject is not compatable with these rigid bodies(i think so).
I tried to use the linear velocity to move it which worked but did not all ways move it in the right Direction:
dbPhySetRigidBodyLinearVelocity ( player, 10 * dbSin(dbObjectAngleY(player))* dbCos(dbObjectAngleX(player)),
10 * dbSin(dbObjectAngleX(player)),
10 * dbCos(dbObjectAngleY(player)) * dbCos(dbObjectAngleX(player)));
The players X and Z angle never changle from 0 but Y rotates when the mouse moves.
is there something wrong with the maths?
can anyone fix this?
thanks in advance
EDIT: im not sure if this is the cause but dbObjectAngleY(player) returns a value with 10 digits, why is it not 0 - 359?