CVR Nav Controller
Controls a NavMeshAgent path. You can select a target or enable patrol mode.
Properties
Section titled “Properties”Nav Mesh Agent
Section titled “Nav Mesh Agent”The NavMeshAgent the component controls.
Nav Target List
Section titled “Nav Target List”List of Transforms the agent will target and navigate to.
Nav Target Index
Section titled “Nav Target Index”Current index of the targeted transform.
Patrol Points
Section titled “Patrol Points”List of Transforms used as patrol checkpoints.
Patrol Point Index
Section titled “Patrol Point Index”Current index of the patrol point. Switches automatically during patrol, and can also be set manually.
Patrol Point Check Distance
Section titled “Patrol Point Check Distance”Distance required to mark a patrol point as visited.
Patrol Enabled
Section titled “Patrol Enabled”Enables patrol mode. The agent no longer targets the Nav Target List when patrol mode is active.
Behaviour
Section titled “Behaviour”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 to0past 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.
Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/CVRNavController.cs