Перейти к основному содержимому

Vision Activities

Advanced AI behaviors for scanning fields of view and patrolling.

Activity Library

Configuration

visibility_detection_activity

Base activity for scanning for players within a cone or sphere. radiusDouble

Max view distance. fovDouble

Field of View angle (degrees). shapeVisionShape

Detection shape: CONE or SPHERE. showDisplayBoolean

Debug: Visualize the view cone (Client-side).

patrol_visibility_detection_activity

Patrols a road network while scanning. roadNetworkRoadNetworkEntry

The path to patrol. nodeIds

"> Specific nodes to visit.

spin_visibility_detection_activity

Spins the NPC while scanning. durationDuration

Time for one full rotation. axisSpinAxis

Axis: YAW (horizontal) or PITCH (vertical).

look_close_visibility_detection_activity

Stares at nearby entities while scanning. lookRangeDouble

Distance to start tracking heads.

path_visibility_detection_activity

Follow a path while detecting players.

PropertyValue
Entry IDpath_visibility_detection_activity
TypeActivity
ColorBlue
Iconmdi:vector-polyline
FieldTypeDescription
networkRef<RoadNetworkEntry>Road network the entity walks on.
targetPositionDestination position on the network.
precisionDoubleHow close the entity must get to consider a node reached.
speedDoubleMovement speed along the path.
visionRadiusVar<Double>The radius of vision.
fovVar<Double>Field of View in degrees (up to 360).
shapeVar<VisionShape>The shape of the vision detection.
showDisplayVar<Boolean>Show debug display (client-side optimized).

random_patrol_visibility_detection_activity

Randomly patrol nodes while detecting players.

PropertyValue
Entry IDrandom_patrol_visibility_detection_activity
TypeActivity
ColorBlue
Iconmdi:eye-plus
FieldTypeDescription
roadNetworkRef<RoadNetworkEntry>Road network the entity patrols.
patrolRadiusDoubleMaximum distance in blocks from the entity's current position.
visionRadiusVar<Double>Maximum distance in blocks the NPC can see.
fovVar<Double>Field of view in degrees (max 360).
shapeVar<VisionShape>Shape of the vision area.
showDisplaysVar<Boolean>Display debug visualization.
stopWhenLookingBooleanPause patrolling while a player is visible.

Example

spin_visibility_detection_activity:
duration: 5s
radius: 20
fov: 45
triggers:
- sound_action:
sound: BLOCK_NOTE_BLOCK_PLING