Skip to content

Flee when the wolf howls

Updated

Six wandering, flocking sheep each get a Steering Flee from a script, disabled until the wolf howls: then fleeing outweighs the other behaviours and the flock scatters.

Press Howl: the sheep run from the amber wolf until they are 12 m away. Press Wolf leaves and they drift back together. Drag to orbit the camera, scroll to zoom.

Flee when the wolf howls

The script is explained step by step in Flee when the wolf howls.

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.

SheepFlee.xrproj