Skip to content

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.

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 = true and useGravity = false. Player collision may be disabled depending on the CollisionWithPlayer mode.
  • Picked up forces useGravity = false and may disable player collision while held.
  • Influenced by a Physics Influencer forces useGravity = false so the influencer can integrate gravity itself.
  • Remote-synced forces useGravity = false and isKinematic = true (the remote owner integrates physics).
  • Otherwise the Rigidbody is reset to its initial gravity/kinematic state.

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.

MemberDescription
CurrentUseGravityTrue if gravity is effectively on right now (taking influencer overrides into account).
DefaultUseGravityCached initial gravity; writable to change the default that the controller restores to.
CurrentIsKinematicTrue if the Rigidbody is currently kinematic.
DefaultIsKinematicCached initial kinematic flag; writable.
DefaultPlayerCollisionModeCached 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")].

  • CVR-GameFiles/ABI.CCK.Components/CVRSharedPhysicsController.cs
  • CVR-GameFiles/ABI.CCK.Components/CollisionWithPlayer.cs