I have a script which is supposed to control a sphere by adding RelativeForce (or RelativeTorque), either way it doesn’t seem to work exactly proper, when the ball is spinning moving the controls get all confused don’t work as they are intended to be, as in left goes forward, right goes left, etc… It works fine in the begining, before altering the balls initial movement position.
This is the code :
inputThrust = Input.GetAxis("Throttle");
inputHorizontal = Input.GetAxis("Horizontal");
if (inputThrust){
rigidbody.AddRelativeTorque (Vector3.forward* inputThrust * maxAcceleration);
}
if (inputHorizontal){
rigidbody.AddRelativeTorque (Vector3.left * inputHorizontal * maxAcceleration);
}
If any one has any idea how to improve this, that’d be sweet, cheers!