Im making a simple Fighter Plane but am having issues controlling it. The Plane rotates on all 3 axis. when level it rotates fine but when it is facing straight upward the y turning is the same as the z.
Code:
// v,h and rot are user inputs
function getTurning(v,h,rot){
var turn : Vector3;
t.rotation.x += (v*TurnSpeed/50);
t.rotation.y += (h*TurnSpeed/50);
t.rotation.z += (rot*TurnSpeed/50);
}
How do I make it so that it rotates the plane like the rotate tool, on its own axis?
Thanks.
Thanks! Now It works
– saberboy117