Forbidden boundaries
In this recipe, we will demonstrate how you may be able to prohibit an AI from crossing an invisible boundary by basic movement. Much like a child's play pen or a dog's yard, you will be building a fence in an area for your AI.
Getting ready
Before we begin, you must have Sandbox 3 open
Then open
My_Level.cry
Place three AI Grunts roughly five meters apart in any fashion
How to do it...
In the RollupBar, click on the AI button.
From the Object Type, select ForbiddenBoundary.
With the Follow Terrain enabled, click four points roughly in a square around the placed Grunts.
Generate the AI navigation.
How it works...
The forbidden boundary is much like a fence for the cattle on a farm. The forbidden boundary deters the AI entities from crossing it with their basic movement behaviours, but they may still be able to cross it if they use attacks or other special animations that change their location at the end of the animation (for example, jumping a fence using Smart Objects). Once...