Class AIBase Extends VersionedMonoBehaviour
Base class for AIPath and RichAI.
This class holds various methods and fields that are common to both AIPath and RichAI.
See
Pathfinding.IAstarAI (all movement scripts implement this interface)
Public Methods
Moves the agent to a position.
Position of the base of the character.
Move the agent.
Calculate how the character wants to move during this frame.
Recalculate the current path.
Make the AI follow the specified path.
Simulates rotating the agent towards the specified direction and returns the new rotation.
Instantly move the agent to a new position.
Public Variables
Enables or disables movement completely.
Enables or disables recalculating the path at regular intervals.
Offset along the Y coordinate for the ground raycast start position.
Velocity that this agent wants to move with.
Position in the world that this agent should move to.
If true, the AI will rotate to face the movement direction.
Gravity to use.
Layer mask to use for ground placement.
Gets or sets if the agent should stop moving.
Max speed in world units per second.
Plane which this agent is moving in.
Called when the agent recalculates its path.
Determines which direction the agent moves in.
Position of the agent.
Determines how often the agent will search for new paths (in seconds).
Rotation of the agent.
Determines if the character's position should be coupled to the Transform's position.
Determines if the character's rotation should be coupled to the Transform's rotation.
Actual velocity that the agent is moving with.
Private/Protected Members
Accelerates the agent downwards.
Calculates how far to move during a single frame.
Outputs the start point and end point of the next automatic path request.
Constrains the character's position to lie on the navmesh.
Cached CharacterController component.
Called every physics update.
Amount which the character wants or tried to move with during the last frame.
Delta time used for movement during the last frame.
Time when the last path request was started.
Called during either Update or FixedUpdate depending on if rigidbodies are used for movement or not.
Called when the component is enabled.
Cached reference to the OnPathComplete method.
Called when a requested path has been calculated.
Handle serialization backwards compatibility.
Position of the character at the end of the last frame.
Position of the character at the end of the frame before the last frame.
Checks if the character is grounded and prevents ground penetration.
Cached Rigidbody component.
Cached Rigidbody component.
Cached RVOController component.
True if the path should be automatically recalculated as soon as possible.
Position of the agent.
Rotation of the agent.
Simulates rotating the agent towards the specified direction and returns the new rotation.
Starts searching for paths.
True if the Start method has been executed.
Just some IEnumerator that can be used as a magic value.
Cached Transform component.
Called every frame.
Helper to reduce code duplication.
Indicates if gravity is used during this frame.
Current desired velocity of the agent (does not include local avoidance and physics).
Velocity due to gravity.
Only when the previous path has been calculated should the script consider searching for a new path.
Deprecated Members
If true, the forward axis of the character will be along the Y axis instead of the Z axis.
Target to move towards.