Requires a CharacterGridMovement ability. Makes the character move randomly in the grid, until it finds an obstacle in its path, in which case it'll pick a new direction at random Supports both 2D and 3D grids
More...
Requires a CharacterGridMovement ability. Makes the character move randomly in the grid, until it finds an obstacle in its path, in which case it'll pick a new direction at random Supports both 2D and 3D grids
◆ Modes
◆ CheckForDuration()
virtual void MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.CheckForDuration |
( |
| ) |
|
|
protectedvirtual |
Checks whether or not we should pick a new direction at random
◆ CheckForObstacles()
virtual void MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.CheckForObstacles |
( |
| ) |
|
|
protectedvirtual |
Checks for obstacles by casting a ray
◆ Initialization()
override void MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.Initialization |
( |
| ) |
|
|
virtual |
◆ Move()
virtual void MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.Move |
( |
| ) |
|
|
protectedvirtual |
◆ OnExitState()
override void MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.OnExitState |
( |
| ) |
|
|
virtual |
◆ PerformAction()
override void MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.PerformAction |
( |
| ) |
|
|
virtual |
◆ PickNewDirection()
virtual void MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.PickNewDirection |
( |
| ) |
|
|
protectedvirtual |
Tests and picks a new direction to move towards
◆ _characterGridMovement
◆ _collider
Collider MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._collider |
|
protected |
◆ _collider2D
Collider2D MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._collider2D |
|
protected |
◆ _direction
Vector2 MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._direction |
|
protected |
◆ _hit
RaycastHit MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._hit |
|
protected |
◆ _hit2D
RaycastHit2D MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._hit2D |
|
protected |
◆ _lastDirectionChangeTimestamp
float MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._lastDirectionChangeTimestamp = 0f |
|
protected |
◆ _lastObstacleDetectionTimestamp
float MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._lastObstacleDetectionTimestamp = 0f |
|
protected |
◆ _raycastDirections2D
Vector2 [] MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._raycastDirections2D |
|
protected |
◆ _raycastDirections3D
Vector3 [] MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._raycastDirections3D |
|
protected |
◆ _rayDirection
Vector3 MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._rayDirection |
|
protected |
◆ _temp2DVector
Vector2 MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._temp2DVector |
|
protected |
◆ _temp3DVector
Vector3 MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._temp3DVector |
|
protected |
◆ _topDownController
TopDownController MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid._topDownController |
|
protected |
◆ Avoid180
bool MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.Avoid180 = true |
if this is true, the AI will avoid 180° turns if possible
◆ MaximumDurationInADirection
float MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.MaximumDurationInADirection = 3f |
the maximum time a character can spend going in a direction without changing
◆ MaximumRandomDirection
Vector2 MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.MaximumRandomDirection = new Vector2(1f, 1f) |
the maximum random direction to randomize from
◆ MinimumRandomDirection
Vector2 MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.MinimumRandomDirection = new Vector2(-1f, -1f) |
the minimal random direction to randomize from
◆ Mode
◆ ObstacleLayerMask
LayerMask MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.ObstacleLayerMask = LayerManager.ObstaclesLayerMask |
the layers the character will try to avoid
◆ ObstaclesCheckFrequency
float MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.ObstaclesCheckFrequency = 1f |
the frequency (in seconds) at which to check for obstacles
◆ ObstaclesDetectionDistance
float MoreMountains.TopDownEngine.AIActionMoveRandomlyGrid.ObstaclesDetectionDistance = 1f |
the minimum distance from the target this Character can reach.
The documentation for this class was generated from the following file: