Book Image

Unity AI Programming Essentials

By : Curtis Bennett
Book Image

Unity AI Programming Essentials

By: Curtis Bennett

Overview of this book

Table of Contents (19 chapters)

The AI animation demo


As the first step, create a new scene and add a plane to it with a scale of X equal to 10, Y equal to 1, and Z equal to 10 to give us a floor where characters can walk around (and if you want, change its material so it's not white). Then, add the penelope model to your scene that's at Assets/Objects/penelopeFX. Next, we'll do our basic RAIN setup and add a navigation mesh by going to RAIN | Create NavMesh. Make sure the navigation mesh will cover the floor, so change its Size to 100 and then generate the mesh. Next, create a waypoint route by going to RAIN | Create Waypoint Route, rename it PenelopeRoute, and add a few points in front of the penelope model for the character to walk. Lastly, add a RAIN AI object by selecting penelope and going to RAIN | Create AI. Your screen should look similar to the following screenshot:

The scene for the AI animation demo

Note

If you need more details on how to set up a scene with a character patrolling a path, refer to Chapter 2, Patrolling...