How do I move a Rigidbody at a constant speed + C# vs Java Poll

when I start my game the player is set to move at 100f, but it starts at 0f and then accelerates to 100f, I want it to move at 100f from the start of the game or it would be better if I could control the exploration speed. I’ve provided the full script.

Thanks in advance.

```csharp
**using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Movement : MonoBehaviour {

public Rigidbody rb;
public float ControleSpeed = 50f;
public float Speed = 100f;

void FixedUpdate()
{
    rb.AddForce(0, 0, Speed * Time.deltaTime);

    float hAxis = Input.GetAxis("Horizontal");

    Vector3 movement = new Vector3(hAxis, 0, 0) * ControleSpeed * Time.deltaTime;
    rb.MovePosition(transform.position + movement);

    if (transform.position.x > 6.5)
    {
        Vector3 pos = transform.position;
        pos.x = 6.5f;
        transform.position = pos;
    }

    if (transform.position.x < -6.5)
    {
        Vector3 pos = transform.position;
        pos.x = -6.5f;
        transform.position = pos;
    }

}

}**
```

AddForce has an overload that takes a ForceMode enum as a parameter and it has an option for VelocityChange that ignores mass causing an instant change in velocity, no acceleration.

1 Like