Hi guys, who of you know the way to solve this ?
CCar is the main bullet vehicle class that contains the definition of RayCastVehicle…
CCar.car.getRigidBody().worldTransform.rotation.y
returns 0 to 90 to 0 to -90 to 0 - if the car are rotating clockwise
so to make this:
_view.camera.y = CCar.car.getRigidBody().worldTransform.position.y + 50;
_view.camera.x = CCar.car.getRigidBody().worldTransform.position.x + -200 * ( Math.sin( CCar.carr ) );
_view.camera.z = CCar.car.getRigidBody().worldTransform.position.z + -200 * ( Math.cos( CCar.carr ) );
i need to use this code for every frame:
carr += car.getRigidBody().angularVelocity.y / 60;
none of this trig function can solve:
http://msdn.microsoft.com/en-us/library/w3t84e33(v=vs.71).aspx
or
http://en.wikipedia.org/wiki/Euler_angles
don’t tell me a solution. Do you know other ( more elegant ) way to solve this ?