Skip to content

CVR Distance LOD

Distance LOD (level of detail) toggles GameObjects on or off based on their distance from the local player.

If enabled, distance is calculated in 3D space. If disabled, the player and this component’s position are projected onto the plane perpendicular to the player’s transform.up and 2D distance is used.

Multiple groups can be configured, each with the following fields.

GameObject to toggle based on distance. Set active when the measured distance is within [MinDistance, MaxDistance].

Minimum distance at which the object becomes active. Objects closer than this are disabled.

Maximum distance at which the object stays active. Beyond this, the object is disabled.

Distance checks run once per second via BetterScheduleSystem, and again when the player teleports (BetterBetterCharacterController.OnTeleport). The editor also draws a concentric-sphere gizmo per group when the component is selected.

  • CVR-GameFiles/ABI.CCK.Components/CVRDistanceLod.cs
  • CVR-GameFiles/ABI.CCK.Components/CVRDistanceLodGroup.cs