Skip to content

CVR World

The primary component for a world. Required for a world to be uploaded. Requires a CVRAssetInfo on the same GameObject and runs with an execution order of int.MinValue so it initialises before other behaviours.

GameObject[]. Each assigned object acts as a spawn point (position and rotation). Null entries are stripped at runtime. When no spawn points are configured, the transform of the CVRWorld GameObject is used.

Enum SpawnRule:

  • Sequential — new players spawn at the points in ascending order.
  • Random — new players spawn at a random point (default).

float. Radius around the chosen spawn point players may be placed within.

GameObject. Camera whose settings are copied to the player’s main camera in-game. When assigned, its SteamAudioListener (and any SteamAudioBakedListener) are copied to both the VR and desktop cameras.

int. Y-coordinate threshold (world space) below which a falling player is respawned. Default -100.

Enum RespawnBehaviour:

  • Respawn — respawns the object when it falls past the respawn height.
  • Destroy — destroys it instead (default).

float. Base LOD bias; multiplied by camera FOV-derived term to set QualitySettings.lodBias on world load. Default 2.

bool. Master toggle. When false, all rules below reset to engine defaults on load.

bool. Permits props to be spawned in the world. Default true.

bool. Permits portal placement. Default true.

bool. Lets players toggle flight. Default true. When false, the active flight state is also forced off.

bool. Shows player name plates. Default true.

bool. Permits the in-world builder tools. Default true.

bool. Permits the desktop zoom (right-click) camera feature. Default true.

float. Default field of view used by the zoom controller. Default 60.

bool. Enables depth-normals rendering on the player’s camera (for shaders that sample it).

bool (formerly allowCustomFarClippingPlane). Allows the reference camera’s far clipping plane to be copied without capping.

HighlightProfile. Override for the highlight plus outline profile. Falls back to defaultHighlightProfile if null.

The following fields drive BetterBetterCharacterController and the gravity system when useAdvancedSettings is enabled. Setters (SetBaseMovementSpeed, SetSprintMultiplier, etc.) also re-apply settings at runtime. Default constants are exposed as DefaultBaseMovementSpeed, etc.

FieldDefaultMeaning
baseMovementSpeed2World walking speed
sprintMultiplier2Sprint multiplier
strafeMultiplier1Strafe multiplier
crouchMultiplier0.5Crouch speed multiplier
proneMultiplier0.3Prone speed multiplier
flyMultiplier5Flight speed multiplier
inAirMovementMultiplier1Air-control multiplier
jumpHeight1Jump impulse
airFriction0.3World air friction
gravity18Player gravity
objectGravity9.81Object / physics gravity
playerGravityAlignmentModeAutoGravitySystem.PlayerAlignmentMode
playerGravityCustomAlignmentValue0Custom alignment angle (range 0..3600)

Values that are NaN or infinite are ignored and the world falls back to engine defaults with a warning.

bool. When enabled with advanced settings, applies the custom layer-collision triangle from collisionMatrix.

List<CVRCollisionListWrapper>. Upper-triangular matrix of per-layer collision flags. Defaults to all true. CaptureCollisionMatrix() can populate it from the live Physics.GetIgnoreLayerCollision state.

List<CVRObjectCatalogCategory>. Categories shown in the builder catalog.

List<CVRObjectCatalogEntry>. Buildable entries referenced by category.

  • Instance — static singleton of the world; extra instances self-destruct.
  • GameRulesUpdated — static Action invoked when movement rules or gameplay flags are re-applied.
  • PickupMarkers — runtime list of registered IPickupMarker consumers.
  • InstancedTerrains / AllTerrains — terrain bookkeeping; drawInstanced is flipped around world transitions.
  • MaterialsInWorld — collected for shader replacement.
  • CompatibilityVersion — static CompatibilityVersions indicating legacy vs SPI content.
  • AssetInfo / DataStore — required / optional sub-components.

Selected public methods (documented for Lua / scripting consumers):

  • SetBaseMovementSpeed, SetSprintMultiplier, SetStrafeMultiplier, SetCrouchMultiplier, SetProneMultiplier, SetFlyMultiplier, SetInAirMovementMultiplier, SetJumpHeight, SetAirFriction, SetGravity, SetObjectGravity, SetPlayerGravityAlignmentMode, SetPlayerGravityCustomAlignmentValue — set a value and re-apply movement settings.
  • ApplyMovementSettings() — re-apply without changing a value.
  • SetPlayerRemotePlayerVisibility, SetPlayerPropVisibility — toggle remote players / spawnables.
  • GetVideoPlayer, RegisterVideoPlayer, UnregisterVideoPlayer, ClearRegisteredVideoPlayers — manage CVRVideoPlayer registrations.
  • GetRespawnHeight, GetSafeRespawnHeight — resolved respawn thresholds.
  • CaptureCollisionMatrix() — snapshot current Physics layer-collision state.

CVR-GameFiles/ABI.CCK.Components/CVRWorld.cs