Hi there,
I’m trying to move an object to the right of the screen with a constant velocity. Then I want to let the player rotate this object clockwise/couterclockwise on the z axis, and have the object move accordingly. I set up a simple physics script attached to my rigidbody that goes like this:
var rotateSpeed = 360.0;
var thrustSpeed = 25.0;
function FixedUpdate() {
transform.Rotate (Vector3.forward * (Input.GetAxis("Horizontal") * rotateSpeed * Time.deltaTime) );
rigidbody.AddRelativeForce (Vector3.right * thrustSpeed * Time.deltaTime);
}
Now, it works quite as expected. The only problem is that I have got way too much inertia: if I rotate, the time my object needs to actually change direction is really really long. I’m aiming to a slicker control (so you rotate and immediately change direction, with just a little hint of inertia.
I’m a bit of a newbie with physics, so I really don’t know where to go from this point on. I tried increasing drag, but this obviously decreases the speed of my object.
Any advice?