Stop Add Force quickly

I’m making GameObject movement with AddForce. But there is a problem that if I released the key and it does not stop quickly. Is there a solution to fix this or a solution to stop AddForce quickly?

“An object in motion stays in motion” is one of the foundational elements of physics. Just because you stop applying force doesn’t mean that the object will suddenly lose the velocity already applied by prior forces.

If you specifically want the object to come to a stop (at any pace) after you stop providing an input force to it, you can apply a counteractive force to slow its movement.

// approximate slowing-per-second, not linearly applied
public float decelerationMultiplier = 0.5f;

void FixedUpdate()
{
	// Simplified example with small amount of input applied
	if(movementInputVector.sqrMagnitude > 0.001f)
	{
		// Apply movement
	}
	else
	{
		// Apply counter-force to slow movement gradually
		rb.AddForce(-rb.velocity * decelerationMultiplier, ForceMode.Acceleration);
	}
}