API reference
API reference
Select your platform
No SDKs available
No versions available

RigidbodyKinematicLocker Class

Extends MonoBehaviour
Manages the kinematic state of a Rigidbody component attached to the GameObject.
This class provides methods to lock and unlock the kinematic state of the Rigidbody, ensuring controlled changes when multiple actors want to modify the kinematic state.

Fields

bool IsLocked[Get]

Member Functions

Locks to true the kinematic state of the attached Rigidbody.
This method increments an internal counter with each call and sets the Rigidbody to kinematic. It also saves the original kinematic state for restoration.
Unlocks the kinematic state of the attached Rigidbody.
This method decrements the internal counter. When the counter reaches zero, it restores the Rigidbody to its original kinematic state.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon