Skip to content

CVR Nav Controller

Controls a NavMeshAgent path. You can select a target or enable patrol mode.

The NavMeshAgent the component controls.

List of Transforms the agent will target and navigate to.

Current index of the targeted transform.

List of Transforms used as patrol checkpoints.

Current index of the patrol point. Switches automatically during patrol, and can also be set manually.

Distance required to mark a patrol point as visited.

Enables patrol mode. The agent no longer targets the Nav Target List when patrol mode is active.

Each Update:

  • If Patrol Enabled, the agent destination is set to patrolPoints[patrolPointIndex]. When the agent gets within Patrol Point Check Distance meters of the current patrol point, the index advances (wrapping back to 0 past the end).
  • Otherwise, navTargetList[navTargetIndex] is used as the destination. The target list index is never advanced automatically — drive it via animation or script.

Null entries in either list are skipped safely.

  • CVR-GameFiles/ABI.CCK.Components/CVRNavController.cs