Wrapper class for 3D and 2D rigidbodies that handles tracking the rigidbody state.
More...
|
| RigidbodyContainer () |
| Creates an empty wrapper with no reference to a rigidbody.
|
|
| RigidbodyContainer (GameObject gameObject) |
| Creates a wrapper for the given GameObject that has either a Rigidbody or Rigidbody2D component.
|
|
void | FindRigidbody (GameObject gameObject) |
| Attempts to find a Rigidbody or Rigidbody2D to reference from the given GameObject or one of its parents.
|
|
void | SetRigidbody (Rigidbody rigidbody) |
| Sets the 3D physics rigidbody referenced by this container.
|
|
void | SetRigidbody2D (Rigidbody2D rigidbody) |
| Sets the 2D physics rigidbody referenced by this container.
|
|
void | ClearRigidbody () |
| Clears the rigidbody reference from this container (does not destroy the rigidbody).
|
|
void | SyncRigidbodyData () |
| Syncs the cached rigidbody data with the current rigidbody state.
|
|
RigidbodyData | GetRigidbodyData () |
| Gets the full rigidbody data with both previous and current states.
|
|
RigidbodyStateData | GetCurrentRigidbodyState () |
| Gets the current rigidbody state, using the values directly from the rigidbody.
|
|
RigidbodyStateData | GetPreviousRigidbodyState () |
| Gets the previous state of the rigidbody from the last time it was synced (i.e. the previous frame).
|
|
Wrapper class for 3D and 2D rigidbodies that handles tracking the rigidbody state.