Ok, so basically my problem is the fact that my GameObject, which is a tank that I made, has a slight rotation to the right for whatever reason. Before I start the game all the rotations are at 0, but when I start moving forward using :
if(Input.GetKey(KeyCode.UpArrow)) {
rigidbody.velocity = transform.forward * speed;
}
the tank starts going slightly to the right.
Actually I just watched the rotations when I started the game and for some reason, all the rotations suddenly change just a teensy bit which is why it’s moving to the right slightly, does anyone know why this happens?
Also, after I rotate using :
transform.Rotate(-Vector3.up * Time.deltaTime * speed * RotateSpeed, Space.World);
It doesn’t immediately stop when I stop rotating, it just adds a teensy bit afterwards which makes it so when I move forward it’s still going to the right slightly.
Sorry if this isn’t making much sense, please tell me if it isn’t and I’ll try explaining better. But this is a very annoying problem.
At start :
When I click play :
When I move forward a bit :
EDIT: BTW, I am using C#