Table of Contents

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 Rigidbody

The Rigidbody to change direction.

direction Vector3

The 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 Rigidbody

The Rigidbody to stop.

Returns

Rigidbody

The modified Rigidbody for method chaining.