Move an object without inertia and acceleration.

Hello,

Actually beginner with unity, I encounter a problem and need a little help to resolve it.

So, what i’m actually trying to do is to move a 2D Circle. It’s simple. And he move. But I somethink annoy me.

I would that this circle move at a constant speed, without inertia and only when user move him.

Actually, I have this code:

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

    public Rigidbody2D Rb2D;
    public int SpeedPlayer = 15;

    void Start () {
     
        Rb2D = GetComponent<Rigidbody2D>();      
    }


    void FixedUpdate()
    {   

        float MoveHorizontal = Input.GetAxis("Horizontal");
        float MoveVertical = Input.GetAxis("Vertical");

        Vector2 MovePlayer = new Vector2(MoveHorizontal, MoveVertical);


        Rb2D.AddForce(MovePlayer * SpeedPlayer * Time.deltaTime);
    }
}

But I don’t know how to remove this inertia and the accelleration.
Have I to use somethink else than RigidBody or AddForce ?

Tank you in advance :slight_smile:

Set the velocity directly instead of using forces.

  void FixedUpdate()
  { 

  float MoveHorizontal = Input.GetAxis("Horizontal");
  float MoveVertical = Input.GetAxis("Vertical");
  Vector2 MovePlayer = new Vector2(MoveHorizontal, MoveVertical);
Rb2D.velocity = MovePlayer;

  }