Stopping a gliding rigidbody

Hello,

I have some rigidbodies that are stopped programmatically:

rb.velocity = Vector3.zero;

Some of them stop, but some other simply glide, despite setting it Vector3.zero.

What do I need to do to stop the rigidbody?

Mirza

That should do it.

Double check the scene to ensure they arn’t being effected by gravity or physics effectors.

“gravity or physics effectors”

hm, thanks for answer, but what are those for example in a scene?

Mirza

Have you tried zeroing the angular velocity as well? I had a similar problem in the past, where an rigidbody would “glide” slightly despite manually setting the velocity to zero.

rb.velocity = Vector3.zero;
rb.angularVelocity = Vector3.zero;
2 Likes

Seems to work! thanks