Skip to content

CVR Movement Parent

CVR Movement Parent Whitelisted: AWP

Section titled “CVR Movement Parent ”

Makes the player stick to an object or platform and inherit its movement.

| Name | Type | Description | |--------------------------|-----------------------------|-------------------------------------------------------------------------------------------| | orientationMode | OrientationMode | Determines whether the player rotates with the parent object. | | velocityInheritance | VelocityInheritanceMode | Controls how the player inherits velocity from the platform. | | applyForcesFromPlayers | bool | If true, players will apply force onto the parent’s rigidbody during movement interactions. |

| Name | Value | Description | |-------------|-------|---------------------------------------------------------------------------------------| | None | 0 | No velocity is inherited. | | Parent | 1 | Velocity is sampled from the platform’s transform position. Legacy behaviour. | | Reference | 2 | Velocity is sampled from the point where the player is standing on the platform. |

| Name | Value | Description | |--------------------|-------|-----------------------------------------------------| | Disabled | 0 | The player does not rotate with the parent object. | | RotateWithParent | 1 | The player inherits the parent’s rotation movement. |

| Name | Type | Description | |------|------|-------------| | fixedVelocity | Vector3 | Read-only. The platform’s velocity sampled at the last FixedUpdate (only filled while the platform is currently acting as a parent). Exposed to Lua under CVR.CCK. |

The base class RelativeSyncedBehaviour drives network-relative-position sync. The Movement Parent additionally:

  • Mirrors orientationMode into the base class ApplyRelativeRotation at Start so rotation follows along when Rotate With Parent is selected.
  • Sets OnlyApplyRelativeHeading based on whether a Gravity Zone sits on the same GameObject (so platforms inside a gravity zone don’t redundantly inherit rotation).
  • Destroys itself if it is parented under a PlayerSetup — prevents broken setups where a local avatar accidentally carries the component.
  • Samples velocity only while velocityInheritance == Parent; the Reference mode is sampled game-side at the player’s foot contact.
  • CVR-GameFiles/ABI.CCK.Components/CVRMovementParent.cs