Requires a CharacterMovement ability. Makes the character move randomly, until it finds an obstacle in its path, in which case it'll pick a new direction at random.
More...
|
| override void | Initialization () |
| | On start we grab our character movement component and pick a random direction.
|
| override void | PerformAction () |
| | On PerformAction we move.
|
| override void | OnExitState () |
| | On exit state we stop our movement.
|
| void | PerformAction () |
| virtual void | OnEnterState () |
| | Describes what happens when the brain enters the state this action is in. Meant to be overridden.
|
Requires a CharacterMovement ability. Makes the character move randomly, until it finds an obstacle in its path, in which case it'll pick a new direction at random.
◆ CheckForDuration()
| virtual void MoreMountains.TopDownEngine.AIActionMoveRandomly3D.CheckForDuration |
( |
| ) |
|
|
protectedvirtual |
Checks whether or not we should pick a new direction at random.
◆ CheckForObstacles()
| virtual void MoreMountains.TopDownEngine.AIActionMoveRandomly3D.CheckForObstacles |
( |
| ) |
|
|
protectedvirtual |
Checks for obstacles by casting a ray.
◆ Initialization()
| override void MoreMountains.TopDownEngine.AIActionMoveRandomly3D.Initialization |
( |
| ) |
|
|
virtual |
◆ Move()
| virtual void MoreMountains.TopDownEngine.AIActionMoveRandomly3D.Move |
( |
| ) |
|
|
protectedvirtual |
◆ OnExitState()
| override void MoreMountains.TopDownEngine.AIActionMoveRandomly3D.OnExitState |
( |
| ) |
|
|
virtual |
◆ PerformAction()
| override void MoreMountains.TopDownEngine.AIActionMoveRandomly3D.PerformAction |
( |
| ) |
|
On PerformAction we move.
◆ PickRandomDirection()
| virtual void MoreMountains.TopDownEngine.AIActionMoveRandomly3D.PickRandomDirection |
( |
| ) |
|
|
protectedvirtual |
Picks a random direction.
◆ _characterMovement
| CharacterMovement MoreMountains.TopDownEngine.AIActionMoveRandomly3D._characterMovement |
|
protected |
◆ _collider
| Collider MoreMountains.TopDownEngine.AIActionMoveRandomly3D._collider |
|
protected |
◆ _direction
| Vector2 MoreMountains.TopDownEngine.AIActionMoveRandomly3D._direction |
|
protected |
◆ _lastDirectionChangeTimestamp
| float MoreMountains.TopDownEngine.AIActionMoveRandomly3D._lastDirectionChangeTimestamp = 0f |
|
protected |
◆ _lastObstacleDetectionTimestamp
| float MoreMountains.TopDownEngine.AIActionMoveRandomly3D._lastObstacleDetectionTimestamp = 0f |
|
protected |
◆ _rayDirection
| Vector3 MoreMountains.TopDownEngine.AIActionMoveRandomly3D._rayDirection |
|
protected |
◆ MaximumDurationInADirection
| float MoreMountains.TopDownEngine.AIActionMoveRandomly3D.MaximumDurationInADirection = 2f |
the maximum time a character can spend going in a direction without changing
◆ MaximumRandomDirection
| Vector2 MoreMountains.TopDownEngine.AIActionMoveRandomly3D.MaximumRandomDirection = new Vector2(1f, 1f) |
the maximum random direction to randomize from
◆ MinimumRandomDirection
| Vector2 MoreMountains.TopDownEngine.AIActionMoveRandomly3D.MinimumRandomDirection = new Vector2(-1f, -1f) |
the minimal random direction to randomize from
◆ ObstacleLayerMask
| LayerMask MoreMountains.TopDownEngine.AIActionMoveRandomly3D.ObstacleLayerMask = LayerManager.ObstaclesLayerMask |
the layers the character will try to avoid
◆ ObstaclesCheckFrequency
| float MoreMountains.TopDownEngine.AIActionMoveRandomly3D.ObstaclesCheckFrequency = 1f |
the frequency (in seconds) at which to check for obstacles
◆ ObstaclesDetectionDistance
| float MoreMountains.TopDownEngine.AIActionMoveRandomly3D.ObstaclesDetectionDistance = 1f |
the minimum distance from the target this Character can reach.
The documentation for this class was generated from the following file: