A* Pathfinding Project  4.1.20
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
MineBotAI Class Reference

AI controller specifically made for the spider robot. More...

Detailed Description

AI controller specifically made for the spider robot.

Deprecated:
This script has been replaced by Pathfinding.Examples.MineBotAnimation. Any uses of this script in the Unity editor will be automatically replaced by one AIPath component and one MineBotAnimation component.

Public Attributes

Animation anim
 Animation component.
 
float animationSpeed = 0.2F
 Speed relative to velocity with which to play animations.
 
GameObject endOfPathEffect
 Effect which will be instantiated when end of path is reached.
 
float sleepVelocity = 0.4F
 Minimum velocity for moving.
 
- Public Attributes inherited from AIPath
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.
 
- Public Attributes inherited from AIBase
bool canMove = true
 Enables or disables movement completely.
 
bool canSearch = true
 Enables or disables recalculating the path at regular intervals.
 
float centerOffset = 1
 Offset along the Y coordinate for the ground raycast start position.
 
bool enableRotation = true
 If true, the AI will rotate to face the movement direction.
 
Vector3 gravity = new Vector3(float.NaN, float.NaN, float.NaN)
 Gravity to use.
 
LayerMask groundMask = -1
 Layer mask to use for ground placement.
 
float maxSpeed = 1
 Max speed in world units per second.
 
SimpleMovementPlane movementPlane = new SimpleMovementPlane()
 Plane which this agent is moving in.
 
OrientationMode orientation = OrientationMode.ZAxisForward
 Determines which direction the agent moves in.
 
float repathRate = 0.5f
 Determines how often the agent will search for new paths (in seconds).
 
bool updatePosition = true
 Determines if the character's position should be coupled to the Transform's position.
 
bool updateRotation = true
 Determines if the character's rotation should be coupled to the Transform's rotation.
 

Additional Inherited Members

- Public Member Functions inherited from AIPath
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.
 
- Protected Member Functions inherited from AIPath
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.
 
virtual void UpdateMovementPlane ()
 
- Protected Attributes inherited from AIPath
PathInterpolator interpolator = new PathInterpolator()
 Helper which calculates points along the current path.
 
Path path
 Current path which is followed.
 
- Static Protected Attributes inherited from AIBase
static readonly Color GizmoColorRaycast = new Color(118.0f/255, 206.0f/255, 112.0f/255)
 
- Properties inherited from AIPath
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.
 

Member Data Documentation

Animation anim

Animation component.

Should hold animations "awake" and "forward"

float animationSpeed = 0.2F

Speed relative to velocity with which to play animations.

GameObject endOfPathEffect

Effect which will be instantiated when end of path is reached.

See Also
OnTargetReached
float sleepVelocity = 0.4F

Minimum velocity for moving.


The documentation for this class was generated from the following file: