Class RigidbodyExtensions
UnityEngine.Rigidbody Based Extension Methods
Inheritance
System.Object
RigidbodyExtensions
Namespace: GDX
Syntax
[VisualScriptingCompatible((short)2)]
public static class RigidbodyExtensions
Methods
| Improve this Doc View SourceMomentOfInertia(Rigidbody, Vector3)
Get a UnityEngine.Rigidbody's moment of inertia for a targetAxis
.
Declaration
public static float MomentOfInertia(this Rigidbody targetRigidbody, Vector3 targetAxis)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Rigidbody | targetRigidbody | The UnityEngine.Rigidbody to evaluate. |
UnityEngine.Vector3 | targetAxis | The axis use to calculate the moment of inertia. |
Returns
Type | Description |
---|---|
System.Single | The moment of inertia for the |
Remarks
Provided targetAxis
must not be UnityEngine.Vector3.zero.
Exceptions
Type | Condition |
---|---|
UnsupportedRuntimeException | Not supported on DOTS Runtime. |