Next: Targeting Computer, Previous: Minion Module, Up: AI [Contents][Index]
This component implements Unity’s NavMesh directly, allowing AI to pathfind around easily. You need to bake a navigation mesh for your scene before it can work, otherwise you will get an error. Click Window -> Navigation to bake a navmesh.
To get started most effectively, we recommend adding some other AI components such as a Guard Module, Melee Module, or others depending on what you want to make. For example, to make a tank, first create an empty object, and parent a 3D model of a tank to it. Then, add a Guard Module, Nav Module to the base object. Finally, add a Turret Action to the turret itself, a Targeting Computer (so it can aim at moving rigidbodies correctly), and create an invisible trigger with a Targeting Sensor component that sends it’s target message to the turret. This creates a tank AI.
If no available station is found, should we send a message?
Should we output useful information to the console?
Default value: false
Tells the Nav Mesh Agent to stop immediately, but does not affect the Nav Module directly.
Causes the agent to be unable to move for a set duration
Argument: Time in seconds that the agent should be unable to move
Finds the nearest object with a given tag, and if found navigates to it.
Argument: The tag of the object we wish to move towards
Sets the Nav Mesh Agent attached to this object to be enabled, allowing it to control the object’s position.
Sets the Nav Mesh Agent attached to this object to be disabled, so that it will not control the object’s position.
Swaps the current enabled state of the Nav Mesh Agent
Causes the AI to always face it’s target, no matter what direction it’s moving in
Causes the AI to always face it’s move direction, no matter the direction of the target
Causes the AI to find an available, unoccupied ’AIStation’ component on an object with the tag you supply, then goes to it if available.
Argument: The GameObject tag of the station type we wish to find for this AI
If no available station is found, should we send a message?
Should we output useful information to the console?
Default value: false
Tells the Nav Mesh Agent to stop immediately, but does not affect the Nav Module directly.
Causes the agent to be unable to move for a set duration
Argument: Time in seconds that the agent should be unable to move
Finds the nearest object with a given tag, and if found navigates to it.
Argument: The tag of the object we wish to move towards
Sets the Nav Mesh Agent attached to this object to be enabled, allowing it to control the object’s position.
Sets the Nav Mesh Agent attached to this object to be disabled, so that it will not control the object’s position.
Swaps the current enabled state of the Nav Mesh Agent
Causes the AI to always face it’s target, no matter what direction it’s moving in
Causes the AI to always face it’s move direction, no matter the direction of the target
Causes the AI to find an available, unoccupied ’AIStation’ component on an object with the tag you supply, then goes to it if available.
Argument: The GameObject tag of the station type we wish to find for this AI
Next: Targeting Computer, Previous: Minion Module, Up: AI [Contents][Index]