Proper way to set a RigidBody's maximum velocity

I am trying to gradually accelerate a GameObject with a RigidBody attached until it reaches a maximum velocity, at which point it becomes unable to gain any more velocity.

  • I know I can simply reset the object
    velocity to an arbitrary maximum
    velocity every frame if it
    overshoots, but I’ve repeteadly heard
    that manually setting an object’s
    velocity is a very bad practice in
    the context of Unity’s physics
    system.
  • I am also aware that in a physical
    sense, objects don’t have a
    “maximum velocity” and that such a
    thing will always be artificial.

I can think of several ways to achieve this, but given these limitations, I would like to know if there’s a standard, optimum way to do this.

The ‘proper’ way is to limit magnitude rather than velocity elements. This is, of course, dependent on the effect you are trying to achieve.


There are many existing answers

https://www.google.co.uk/search?client=firefox-b&dcr=0&ei=_bNlWtW0KaWBgAbW0bWwBQ&q=unity+maximum+rigidbody+velocity+magnitude&oq=unity+maximum+rigidbody+velocity+magnitude&gs_l=psy-ab.3...2869.2869.0.3725.1.1.0.0.0.0.82.82.1.1.0....0...1.1.64.psy-ab..0.0.0....0.E6NdvaZrFSU