Is there a way to limit the max velocity of all Rigidbodies in a scene?

Hello everyone!

I’m working on a game where you can drag stuff, but I want to make sure that when objects interact they don’t pass a certain velocity, just so it looks more realistic and stuff cannot go too too crayz.

Is there an easy or rather simple way to set a max velocity for objects, while not iterating trough every object every thick?

You could probably create a class that just contains the max possible velocity. Then, anything that is using rigidbodies can access that and it references that velocity limit. There are probably a few ways to limit it but one i can think of is some sort of if(rb.velocity >= InheritedClass.velocityLimit) then set velocity or something.

Or over time you could increase angular drag for each object, increase mass, gravity, etc. Probably a ton of ways to do it.

1 Like

theres some max settings here, not sure if those would help

  • Max Translation Speed : Set the maximum linear speed of a Rigidbody 2D GameObject during any physics update.
  • Max Rotation Speed : Set the maximum rotation speed of a Rigidbody 2D GameObject during any physics update.
    Unity - Manual: Physics 2D
1 Like