CVR Shared Physics Controller
Bookkeeping component that reconciles a GameObject’s Rigidbody state against the many CCK systems that may be manipulating it at once: pickup, attachment, network sync, and a Physics Influencer. Added automatically when any of those systems engage — authors rarely add it by hand.
Runtime state
Section titled “Runtime state”The controller caches the Rigidbody’s “initial” gravity, kinematic, and player-collision settings when it wakes, then re-derives the current state any time one of the CCK systems signals a change (pickup/release, attach/detach, sync, influencer activation). The derived state follows these rules:
- Attached forces
isKinematic = trueanduseGravity = false. Player collision may be disabled depending on theCollisionWithPlayermode. - Picked up forces
useGravity = falseand may disable player collision while held. - Influenced by a Physics Influencer forces
useGravity = falseso the influencer can integrate gravity itself. - Remote-synced forces
useGravity = falseandisKinematic = true(the remote owner integrates physics). - Otherwise the Rigidbody is reset to its initial gravity/kinematic state.
Collision With Player modes
Section titled “Collision With Player modes”When the object is picked up or attached, player collision is removed based on the requested collision mode. On release, the controller either restores collision immediately (DisableWhileHeld), keeps it disabled (DontDisable), or waits until the object is no longer intersecting the player before restoring it — pushing the player out of the way if the overlap persists longer than 0.5 seconds.
Public API
Section titled “Public API”| Member | Description |
|---|---|
CurrentUseGravity | True if gravity is effectively on right now (taking influencer overrides into account). |
DefaultUseGravity | Cached initial gravity; writable to change the default that the controller restores to. |
CurrentIsKinematic | True if the Rigidbody is currently kinematic. |
DefaultIsKinematic | Cached initial kinematic flag; writable. |
DefaultPlayerCollisionMode | Cached initial CollisionWithPlayer mode. |
ResetToInitialState() | Clears attached/held/influenced/synced flags and re-applies the initial state. |
TickleRigidbody() | Wakes the Rigidbody and gives it a one-frame downward impulse — used to pop a resting body out of a stuck state. |
Several Get*/Set*/Is* methods mirror the properties and are preserved for backwards compatibility — the decompile marks them [Obsolete("Fix When Wasm")].
Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/CVRSharedPhysicsController.csCVR-GameFiles/ABI.CCK.Components/CollisionWithPlayer.cs