Advanced AI for navmesh based graphs.
More...
Advanced AI for navmesh based graphs.
- Deprecated:
- Use the RichAI class instead. This class only exists for compatibility reasons.
- A* Pro Feature:
- This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited
The Pro version can be bought here
|
bool | preciseSlowdown = true |
| Use a 3rd degree equation for calculating slowdown acceleration instead of a 2nd degree.
|
|
bool | raycastingForGroundPlacement = false |
|
float | acceleration = 5 |
| Max acceleration of the agent.
|
|
Animation | anim |
|
float | endReachedDistance = 0.01f |
| Max distance to the endpoint to consider it reached.
|
|
bool | funnelSimplification = false |
| Use funnel simplification.
|
|
float | maxSpeed = 1 |
| Max speed of the agent.
|
|
float | repathRate = 0.5f |
| Delay (seconds) between path searches.
|
|
bool | repeatedlySearchPaths = false |
| Search for new paths repeatedly.
|
|
float | rotationSpeed = 360 |
| Max rotation speed of the agent.
|
|
float | slowdownTime = 0.5f |
| How long before reaching the end of the path to start to slow down.
|
|
bool | slowWhenNotFacingTarget = true |
| Slow down when not facing the target direction.
|
|
Transform | target |
| Target position to move to.
|
|
float | wallDist = 1 |
| Walls within this range will be used for avoidance.
|
|
float | wallForce = 3 |
| Force to avoid walls with.
|
|
float | centerOffset = 1 |
| Offset along the Y coordinate for the ground raycast start position.
|
|
Vector3 | gravity = new Vector3(float.NaN, float.NaN, float.NaN) |
| Gravity to use.
|
|
LayerMask | groundMask = -1 |
| Layer mask to use for ground placement.
|
|
bool | rotationIn2D = false |
| If true, the forward axis of the character will be along the Y axis instead of the Z axis.
|
|
|
override void | Awake () |
| Initializes reference variables.
|
|
override IEnumerator | TraverseSpecial (RichSpecial rs) |
|
override void | Update () |
| Update is called once per frame.
|
|
void | CancelCurrentPathRequest () |
|
override Vector3 | ClampToNavmesh (Vector3 position) |
| Constrains the character's position to lie on the navmesh.
|
|
override void | MovementUpdate (float deltaTime) |
| Called during either Update or FixedUpdate depending on if rigidbodies are used for movement or not.
|
|
void | NextPart () |
| Declare that the AI has completely traversed the current part.
|
|
virtual void | OnDisable () |
| Called when the component is disabled.
|
|
override void | OnDrawGizmos () |
|
virtual void | OnEnable () |
| Called when the component is enabled.
|
|
virtual void | OnTargetReached () |
| Called when the end of the path is reached.
|
|
virtual void | Start () |
| Starts searching for paths.
|
|
virtual Vector3 | UpdateTarget (RichFunnel fn) |
|
void | ApplyGravity (float deltaTime) |
|
Vector2 | CalculateDeltaToMoveThisFrame (Vector2 position, float distanceToEndOfPath, float deltaTime) |
|
virtual void | FixedUpdate () |
| Called every physics update.
|
|
void | Move (Vector3 position3D, Vector3 deltaPosition) |
|
Vector3 | RaycastPosition (Vector3 position, float lastElevation) |
| Find the world position of the ground below the character.
|
|
virtual void | RotateTowards (Vector2 direction, float maxDegrees) |
| Rotates in the specified direction.
|
|
virtual int | OnUpgradeSerializedData (int version) |
| Handle serialization backwards compatibility.
|
|
|
new Vector3 | RaycastPosition (Vector3 position, float lasty) |
|
bool | RotateTowards (Vector3 trotdir) |
| Rotates along the Y-axis the transform towards trotdir.
|
|
|
static float | deltaTime |
| Smooth delta time to avoid getting overly affected by e.g GC.
|
|
Initializes reference variables.
If you override this function you should in most cases call base.Awake () at the start of it.
Reimplemented from AIBase.
new Vector3 RaycastPosition |
( |
Vector3 |
position, |
|
|
float |
lasty |
|
) |
| |
|
private |
bool RotateTowards |
( |
Vector3 |
trotdir | ) |
|
|
private |
Rotates along the Y-axis the transform towards trotdir.
Update is called once per frame.
Reimplemented from AIBase.
Vector3 currentTargetDirection |
|
private |
Smooth delta time to avoid getting overly affected by e.g GC.
bool preciseSlowdown = true |
Use a 3rd degree equation for calculating slowdown acceleration instead of a 2nd degree.
A 3rd degree equation can also make sure that the velocity when reaching the target is roughly zero and therefore it will have a more direct stop. In contrast solving a 2nd degree equation which will just make sure the target is reached but will usually have a larger velocity when reaching the target and therefore look more "bouncy".
bool raycastingForGroundPlacement = false |
Current velocity of the agent.
Includes eventual velocity due to gravity
The documentation for this class was generated from the following file:
- /Users/arong/Unity/a-pathfinding-project/Assets/AstarPathfindingProject/Legacy/LegacyRichAI.cs