Class SimpleAgent
A high level component that allows you to create characters that intelligently move along navigation meshes to their destinations.
Inheritance
Implements
Inherited Members
Namespace: AlchemyBow.Navigation.Simple
Assembly: AlchemyBow.Navigation.dll
Syntax
[SelectionBase]
public sealed class SimpleAgent : BasicAgent, ISteeredBehaviour
Properties
| Improve this Doc View SourceIsPathWalking
Determines whether an agent is walking along the path.
Declaration
protected override bool IsPathWalking { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Overrides
| Improve this Doc View SourceVelocity
Gets the velocity at which the agent is moving.
Declaration
public Vector3 Velocity { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 | The velocity at which the agent is moving. |
Methods
| Improve this Doc View SourceOnAgentDisable()
Called when the agent becomes disabled or inactive.
Declaration
protected override void OnAgentDisable()
Overrides
| Improve this Doc View SourceOnAgentEnable()
Called when the agent becomes enabled and active.
Declaration
protected override void OnAgentEnable()
Overrides
| Improve this Doc View SourceOnAreaMaskChanged()
Called when the area mask property is changed.
Declaration
protected override void OnAreaMaskChanged()
Overrides
| Improve this Doc View SourceOnLayerChanged()
Called when the layer property is changed.
Declaration
protected override void OnLayerChanged()
Overrides
| Improve this Doc View SourceOnPath(Vector3[], IImmutableFace[])
Called when one of the requested paths is calculated.
Declaration
protected override void OnPath(Vector3[] pointPath, IImmutableFace[] facePath)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3[] | pointPath | The calculated path consisting of waypoints. |
IImmutableFace[] | facePath | The calculated path consisting of faces. |
Overrides
| Improve this Doc View SourceOnRequestsCanceled()
Called when requests are canceled.
Declaration
protected override void OnRequestsCanceled()
Overrides
| Improve this Doc View SourceOnSurfaceAvailable(PathfindingRequest)
Called when the surface becomes available.
Declaration
protected override void OnSurfaceAvailable(PathfindingRequest delayedRequest)
Parameters
Type | Name | Description |
---|---|---|
PathfindingRequest | delayedRequest | A request that was delayed until surface becomes available. |
Overrides
| Improve this Doc View SourceReloadMovementModifiers()
Reloads all movement modifiers.
Declaration
public void ReloadMovementModifiers()
Remarks
You need to call this method when movement modifiers are added/removed at run-time.
SetDestination(Vector3, Boolean)
Sets the target location.
Declaration
public void SetDestination(Vector3 destination, bool stopCurrentMovement)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | destination | The the target location. |
System.Boolean | stopCurrentMovement | Determines whether to stop the current motion or not. |
Events
| Improve this Doc View SourceOnDestinationReached
Raised when the agent reaches the target location.
Declaration
public event NavigationAct OnDestinationReached
Event Type
Type | Description |
---|---|
NavigationAct |