Class
- Namespace
- CoreFramework
Provides extension methods for the Rigidbody class, enabling additional functionality.
public static class RigidbodyExtensions
- Inheritance
-
object
Methods
ChangeDirection(Rigidbody, Vector3)
Changes the direction of the Rigidbody's velocity while maintaining its speed.
public static Rigidbody ChangeDirection(this Rigidbody rigidbody, Vector3 direction)
Parameters
rigidbody
RigidbodyThe Rigidbody to change direction.
direction
Vector3The new direction for the Rigidbody.
Returns
- Rigidbody
The modified Rigidbody for method chaining.
Stop(Rigidbody)
Stops the Rigidbody by setting its linear and angular velocities to zero.
public static Rigidbody Stop(this Rigidbody rigidbody)
Parameters
rigidbody
RigidbodyThe Rigidbody to stop.
Returns
- Rigidbody
The modified Rigidbody for method chaining.