I am trying to addforce to an object to let it constantly move to the right on a fixed speed. But when I try it with the following code, the speed starts slowly and starts adding up and going very fast over time. How can I keep the speed to be constant without adding on.
I do not want it to start slowly. I want it to immediately react to the speed and keep to the same speed through out.
I am trying to use AddForce instead of switching to manipulating velocity directly. Please advice what I am doing wrong.
public float speed = 15;
Rigidbody2D rb;
void Start()
{
rb = GetComponent<Rigidbody2D>();
}
void Update()
{
rb.AddForce(Vector2.right * speed * Time.deltaTime);
}