User Tools
Sidebar
Using RAIN
AI Characters
Environment
Table of Contents
Basic Navigator
Properties
- Use Unity Messages (Advanced): Whether the AI is initialized and updated by Unity or done manually.
- Use Fixed Update (Advanced): Whether the AI responds to Unity Update or FixedUpdate messages. Only valid if Use Unity Messages is checked.
- Is Active (Advanced): Whether the AI is currently updating.
- Body: The GameObject that the AI will move and animate.
- Navigator: The type of navigator used. Currently RAIN supports only one navigator type, Basic Navigator (this one). If you create your own Custom Navigator you can select it here.
- Draw Paths: Enables the drawing of paths in the Scene View when the AI is selected.
- Max Pathfinding Steps (Advanced): The maximum number of steps the pathfinder will take in one Update. Useful for extremely large graphs.
- Graph Tags (Advanced): Graph Tags (Advanced): Used in conjunction with the Graph Tags located on the Navigation Mesh Rig. They can be used to limit what graphs are available to a specific AI.
Usage
The Basic Navigator is used by the Basic Motor, Character Controller Motor, and Mecanim Motor to find and follow paths in your Unity scene. It works in conjunction with any Navigation Mesh Rigs to create these paths.
To help control what Navigation Meshes are available to the AI, you can use Graph Tags to isolate them. If Graph Tags remains empty, all Navigation Meshes will be considered valid. If you define one or more tags, only Navigation Meshes that have at least those tags will be considered. For example:
You have the following Navigation Meshes:
- Tall Mesh (Graph Tags = “Human”, “Tall”)
- Small Mesh (Graph Tags = “Human”, “Small”)
- Zombie Mesh (Graph Tags = “Zombie”)
And the following AI:
- Human (Graph Tags = “Human”)
- Tall Human (Graph Tags = “Human”, “Tall”)
- Zombie (No Graph Tags)
In this example, the Human would only be able to use the Tall Mesh and Small Mesh (the only ones that have “Human”), the Tall Human would only be able to use the Tall Mesh (only one that has both “Human” and “Tall”), and the Zombie would be able to use all of them (since it doesn't define any Graph Tags).
The remaining options are mainly for optimizing (Max Pathfinding Steps) and debugging (Draw Paths).