|
override void | ApplyGravity (float deltaTime) |
| Accelerates the agent downwards.
|
|
override void | Start () |
| Starts searching for paths.
|
|
override void | Update () |
| Called every frame.
|
|
override void | UpdateMovementPlane () |
| Find the world position of the ground below the character.
|
|
virtual void | CalculateNextRotation (float slowdown, out Quaternion nextRotation) |
|
override Vector3 | ClampToNavmesh (Vector3 position, out bool positionChanged) |
| Constrains the character's position to lie on the navmesh.
|
|
override void | MovementUpdateInternal (float deltaTime, out Vector3 nextPosition, out Quaternion nextRotation) |
| Called during either Update or FixedUpdate depending on if rigidbodies are used for movement or not.
|
|
override void | OnDisable () |
|
override void | OnPathComplete (Path newPath) |
| Called when a requested path has been calculated.
|
|
override int | OnUpgradeSerializedData (int version, bool unityThread) |
| Handle serialization backwards compatibility.
|
|
| AIBase () |
|
Vector2 | CalculateDeltaToMoveThisFrame (Vector3 position, float distanceToEndOfPath, float deltaTime) |
| Calculates how far to move during a single frame.
|
|
virtual void | CalculatePathRequestEndpoints (out Vector3 start, out Vector3 end) |
| Outputs the start point and end point of the next automatic path request.
|
|
void | CancelCurrentPathRequest () |
|
virtual void | FindComponents () |
|
virtual void | FixedUpdate () |
| Called every physics update.
|
|
virtual void | OnDrawGizmos () |
|
virtual void | OnDrawGizmosSelected () |
|
virtual void | OnEnable () |
| Called when the component is enabled.
|
|
Vector3 | RaycastPosition (Vector3 position, float lastElevation) |
| Checks if the character is grounded and prevents ground penetration.
|
|
Quaternion | SimulateRotationTowards (Vector2 direction, float maxDegrees) |
| Simulates rotating the agent towards the specified direction and returns the new rotation.
|
|
void | UpdateVelocity () |
|
virtual void | Awake () |
|
|
Vector3 | CalculateVelocity (Vector3 position) |
| Current desired velocity of the agent (excluding physics and local avoidance but it includes gravity).
|
|
virtual void | OnTargetReached () |
| The end of the path has been reached.
|
|
override void | Teleport (Vector3 newPosition, bool clearPath=true) |
| Instantly move the agent to a new position.
|
|
bool | alwaysDrawGizmos |
| Draws detailed gizmos constantly in the scene view instead of only when the agent is selected and settings are being modified.
|
|
bool | constrainInsideGraph = false |
| Ensure that the character is always on the traversable surface of the navmesh.
|
|
float | endReachedDistance = 0.2F |
| Distance to the end point to consider the end of path to be reached.
|
|
float | maxAcceleration = -2.5f |
| How quickly the agent accelerates.
|
|
float | pickNextWaypointDist = 2 |
| How far the AI looks ahead along the path to determine the point it moves to.
|
|
float | rotationSpeed = 360 |
| Rotation speed in degrees per second.
|
|
float | slowdownDistance = 0.6F |
| Distance from the end of the path where the AI will start to slow down.
|
|
bool | slowWhenNotFacingTarget = true |
| Slow down when not facing the target direction.
|
|
CloseToDestinationMode | whenCloseToDestination = CloseToDestinationMode.Stop |
| What to do when within endReachedDistance units from the destination.
|
|
PathInterpolator | interpolator = new PathInterpolator() |
| Helper which calculates points along the current path.
|
|
Path | path |
| Current path which is followed.
|
|
static readonly Color | GizmoColorRaycast = new Color(118.0f/255, 206.0f/255, 112.0f/255) |
|
bool IAstarAI. | canMove [get, set] |
| Enables or disables movement completely.
|
|
bool IAstarAI. | canSearch [get, set] |
| Enables or disables recalculating the path at regular intervals.
|
|
bool | hasPath [get] |
| True if this agent currently has a path that it follows.
|
|
float IAstarAI. | maxSpeed [get, set] |
| Max speed in world units per second.
|
|
bool | pathPending [get] |
| True if a path is currently being calculated.
|
|
bool | reachedEndOfPath [get, set] |
| True if the agent has reached the end of the current path.
|
|
float | remainingDistance [get] |
| Remaining distance along the current path to the end of the path.
|
|
float | speed [get, set] |
| Maximum speed in world units per second.
|
|
Vector3 | steeringTarget [get] |
| Point on the path which the agent is currently moving towards.
|
|
Vector3 | targetDirection [get] |
| Direction that the agent wants to move in (excluding physics and local avoidance).
|
|
bool | TargetReached [get] |
| True if the end of the path has been reached.
|
|
float | turningSpeed [get, set] |
| Rotation speed.
|
|