stop adding force

Hello,

Is there a way to stop adding force, instead of having the gravity switched on?

The Scenario is that, whenever i press the left mouse button to move a game object up with add force, i want to be able to say that if i released the button, i want to be able to stop the force adding thus stopping the game object

Add force is only applied when ever it is called.

if(mousebutton)
{
add force
}

if “if” if false, add force is not applied, if your object is still moving its because of the forces that was added. you can increase the drag to make it slow down faster after the force is not longer added. If you want to stop it entirely you can use velocity.vector3.zero but this has unrealistic effects.

The first thing to know is that, as in real workd physics, whent an object is subject to no force, it doesn’t stop! It simply continues in a straight line at constant speed. Your object probably slows down because it has drag. As Anxo said, you can either ramp up the drag (its max value being 1’000’000), or set its velocity to zero for a brutal stop.