Skip to content

A guard that spots and chases the player

Updated

A guard patrols a loop with Steering Follow Path; when the camera comes within 15 m, the script hands over to Steering Pursue and speeds it up, and an Enable On Signal lights its alarm.

Scroll in to bring the camera closer than 15 m: once the guard faces you, it runs at you. Scroll out to let it return to its patrol. Drag to orbit the camera.

A guard that spots and chases the player

The script is explained step by step in A guard that spots and chases the player.

Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.

GuardChase.xrproj