Impact CFX API 1.5.0
Comprehensive API documentation for Impact CFX - Collision Effects System
Loading...
Searching...
No Matches
ImpactCFX.RigidbodyContainer Class Reference

Wrapper class for 3D and 2D rigidbodies that handles tracking the rigidbody state. More...

Public Member Functions

 RigidbodyContainer (GameObject gameObject)
 Creates a wrapper for the given GameObject that has either a Rigidbody or Rigidbody2D component.
 
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).
 
Vector3 GetContactPointRelativePosition (Vector3 point)
 Gets the point's relative position.
 

Detailed Description

Wrapper class for 3D and 2D rigidbodies that handles tracking the rigidbody state.

Constructor & Destructor Documentation

◆ RigidbodyContainer()

ImpactCFX.RigidbodyContainer.RigidbodyContainer ( GameObject  gameObject)

Creates a wrapper for the given GameObject that has either a Rigidbody or Rigidbody2D component.

Parameters
gameObjectA GameObject that has either a Rigidbody or Rigidbody2D component

Member Function Documentation

◆ GetContactPointRelativePosition()

Vector3 ImpactCFX.RigidbodyContainer.GetContactPointRelativePosition ( Vector3  point)

Gets the point's relative position.

Parameters
pointThe point to get the relative position of.
Returns
The point in local space.