================== Physics Extensions ================== Overview -------- * :ref:`ClampVelocity` * :ref:`Get Help ` **EXTENSIONS** -------------- ClampVelocity ------------- * ``ClampVelocity(float min, float max)`` * ``ClampVelocity(Vector2 min, Vector2 max)`` - **Rigidbody2D-Only** * ``ClampVelocity(Vector3 min, Vector3 max)`` - **Rigidbody-Only** Clamps the Rigidbody's velocity. There are some variants for this method. .. code-block:: csharp :linenos: using NutTools; using UnityEngine; public class MyClass: MonoBehaviour { Rigidbody rbody; Rigidbody2D rbody2d; void MyMethod() { // ... rbody.ClampVelocity(-3f, 3f); rbody2d.ClampVelocity(new Vector2(-3f, -5f), new Vector2(3f, 5f)); // ... } } **** **GET HELP** ------------ `Join this Discord server `_ to get help from the community, suggest new features, and vote on future updates! .. seealso:: * :ref:`Array and List Extensions ` * :ref:`GameObject and Component Extensions ` * :ref:`ParticleSystem Extensions ` * :ref:`Texture Extensions ` * :ref:`Value Extensions `