How to turn off inertia when player stops moving?

When I release the character control button, character itself continues to move for about half a second. I want the character to stop right after I release the control button. I’ve tried diffirent methods: AddForce and velocity, but it’s all in vain.

Also, I tried to adjust the mass and drag momentum in Inspector of the character, but it didn’t help.

public class CapsuleMovement : MonoBehaviour
{

    Rigidbody rb;
    Vector3 playerMovement;
    [SerializeField] float speed = 50;
    
    void Start()
    {
        rb = GetComponent<Rigidbody>();
    }

    void FixedUpdate()
    {
        ProccessCapsuleMovement();
    }

    void ProccessCapsuleMovement () {

        playerMovement = new Vector3 (Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
        playerMovement.Normalize();

        rb.velocity = playerMovement * speed * Time.deltaTime;

    }
}

When you add Velocity to Rigidbody its like adding some force to it,to the direction, so after you done doing that you should set your velocity to 0 after your move has been performed

for example when i hit the ball i add a velocity to it, and its going down as the forces slow it down, but if i had a Force like a Jedi in real life i could just set its velocity to 0 when i feel like, you get the point? :smiley:

Also check if you are moving on a Slippery material or any Slippery material has been added to player or ground!