This Action will make the Character patrols until it (optionally) hits a wall or a hole.
More...
|
bool | ChangeDirectionOnWall = true |
| If set to true, the agent will change direction when hitting a wall. More...
|
|
bool | AvoidFalling = false |
| If set to true, the agent will try and avoid falling. More...
|
|
Vector3 | HoleDetectionOffset = new Vector3(0, 0, 0) |
| The offset the hole detection should take into account. More...
|
|
float | HoleDetectionRaycastLength = 1f |
| the length of the ray cast to detect holes More...
|
|
bool | UseCustomLayermask = false |
| Whether to use a custom layermask, or simply use the platform mask defined at the character level. More...
|
|
LayerMask | ObstaclesLayermask = LayerManager.ObstaclesLayerMask |
| if using a custom layer mask, the list of layers considered as obstacles by this AI More...
|
|
float | ObstaclesDetectionRaycastLength = 0.5f |
| the length of the horizontal raycast we should use to detect obstacles that may cause a direction change More...
|
|
Vector2 | ObstaclesDetectionRaycastOrigin = new Vector2(0.5f, 0f) |
| the origin of the raycast (if casting against the same layer this object is on, the origin should be outside its collider, typically in front of it) More...
|
|
bool | ResetPositionOnDeath = true |
| if this is true, the character will automatically return to its initial position on revive More...
|
|
InitializationModes | InitializationMode |
| whether initialization should happen only once, or every time the brain is reset More...
|
|
string | Label |
| a label you can set to organize your AI Actions, not used by anything else More...
|
|
This Action will make the Character patrols until it (optionally) hits a wall or a hole.
◆ ChangeDirection()
virtual void MoreMountains.CorgiEngine.AIActionPatrol.ChangeDirection |
( |
| ) |
|
|
protectedvirtual |
Changes the current movement direction
◆ CheckForHoles()
virtual void MoreMountains.CorgiEngine.AIActionPatrol.CheckForHoles |
( |
| ) |
|
|
protectedvirtual |
◆ CheckForWalls()
virtual void MoreMountains.CorgiEngine.AIActionPatrol.CheckForWalls |
( |
| ) |
|
|
protectedvirtual |
Checks for a wall and changes direction if it meets one
◆ DetectObstaclesCustomLayermask()
bool MoreMountains.CorgiEngine.AIActionPatrol.DetectObstaclesCustomLayermask |
( |
| ) |
|
|
protected |
Returns true if an obstacle is in front of the character, using a custom layer mask
- Returns
◆ DetectObstaclesRegularLayermask()
bool MoreMountains.CorgiEngine.AIActionPatrol.DetectObstaclesRegularLayermask |
( |
| ) |
|
|
protected |
Returns true if an obstacle is colliding with this AI, using its controller layer masks
- Returns
◆ Initialization()
override void MoreMountains.CorgiEngine.AIActionPatrol.Initialization |
( |
| ) |
|
|
virtual |
◆ OnDisable()
virtual void MoreMountains.CorgiEngine.AIActionPatrol.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On disable we stop listening for OnRevive events
◆ OnEnable()
virtual void MoreMountains.CorgiEngine.AIActionPatrol.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable we start listening for OnRevive events
◆ OnExitState()
override void MoreMountains.CorgiEngine.AIActionPatrol.OnExitState |
( |
| ) |
|
|
virtual |
◆ OnRevive()
virtual void MoreMountains.CorgiEngine.AIActionPatrol.OnRevive |
( |
| ) |
|
|
protectedvirtual |
When reviving we make sure our directions are properly setup
◆ Patrol()
virtual void MoreMountains.CorgiEngine.AIActionPatrol.Patrol |
( |
| ) |
|
|
protectedvirtual |
◆ PerformAction()
override void MoreMountains.CorgiEngine.AIActionPatrol.PerformAction |
( |
| ) |
|
|
virtual |
◆ _character
Character MoreMountains.CorgiEngine.AIActionPatrol._character |
|
protected |
◆ _characterHorizontalMovement
◆ _controller
◆ _direction
Vector2 MoreMountains.CorgiEngine.AIActionPatrol._direction |
|
protected |
◆ _distanceToTarget
float MoreMountains.CorgiEngine.AIActionPatrol._distanceToTarget |
|
protected |
◆ _health
Health MoreMountains.CorgiEngine.AIActionPatrol._health |
|
protected |
◆ _initialDirection
Vector2 MoreMountains.CorgiEngine.AIActionPatrol._initialDirection |
|
protected |
◆ _initialScale
Vector3 MoreMountains.CorgiEngine.AIActionPatrol._initialScale |
|
protected |
◆ _obstacleDirection
Vector2 MoreMountains.CorgiEngine.AIActionPatrol._obstacleDirection |
|
protected |
◆ _raycastHit2D
RaycastHit2D MoreMountains.CorgiEngine.AIActionPatrol._raycastHit2D |
|
protected |
◆ _raycastOrigin
Vector2 MoreMountains.CorgiEngine.AIActionPatrol._raycastOrigin |
|
protected |
◆ _startPosition
Vector2 MoreMountains.CorgiEngine.AIActionPatrol._startPosition |
|
protected |
◆ AvoidFalling
bool MoreMountains.CorgiEngine.AIActionPatrol.AvoidFalling = false |
If set to true, the agent will try and avoid falling.
◆ ChangeDirectionOnWall
bool MoreMountains.CorgiEngine.AIActionPatrol.ChangeDirectionOnWall = true |
If set to true, the agent will change direction when hitting a wall.
◆ HoleDetectionOffset
Vector3 MoreMountains.CorgiEngine.AIActionPatrol.HoleDetectionOffset = new Vector3(0, 0, 0) |
The offset the hole detection should take into account.
◆ HoleDetectionRaycastLength
float MoreMountains.CorgiEngine.AIActionPatrol.HoleDetectionRaycastLength = 1f |
the length of the ray cast to detect holes
◆ ObstaclesDetectionRaycastLength
float MoreMountains.CorgiEngine.AIActionPatrol.ObstaclesDetectionRaycastLength = 0.5f |
the length of the horizontal raycast we should use to detect obstacles that may cause a direction change
◆ ObstaclesDetectionRaycastOrigin
Vector2 MoreMountains.CorgiEngine.AIActionPatrol.ObstaclesDetectionRaycastOrigin = new Vector2(0.5f, 0f) |
the origin of the raycast (if casting against the same layer this object is on, the origin should be outside its collider, typically in front of it)
◆ ObstaclesLayermask
if using a custom layer mask, the list of layers considered as obstacles by this AI
◆ ResetPositionOnDeath
bool MoreMountains.CorgiEngine.AIActionPatrol.ResetPositionOnDeath = true |
if this is true, the character will automatically return to its initial position on revive
◆ UseCustomLayermask
bool MoreMountains.CorgiEngine.AIActionPatrol.UseCustomLayermask = false |
Whether to use a custom layermask, or simply use the platform mask defined at the character level.
The documentation for this class was generated from the following file: