Inherits from AIActionPatrol but also lets you define left and right bounds that the character can't exceed.
More...
|
| BoundsMethods | BoundsMethod = BoundsMethods.BasedOnOriginPosition |
| | the chosen BoundsMethod
|
| float | BoundsExtentsLeft |
| | the max distance the character can patrol to the left
|
| float | BoundsExtentsRight |
| | the max distance the character can patrol to the right
|
| bool | ChangeDirectionOnWall = true |
| | If set to true, the agent will change direction when hitting a wall.
|
| bool | AvoidFalling = false |
| | If set to true, the agent will try and avoid falling.
|
| Vector3 | HoleDetectionOffset = new Vector3(0, 0, 0) |
| | The offset the hole detection should take into account.
|
| float | HoleDetectionRaycastLength = 1f |
| | the length of the ray cast to detect holes
|
| bool | UseCustomLayermask = false |
| | Whether to use a custom layermask, or simply use the platform mask defined at the character level.
|
| LayerMask | ObstaclesLayermask = LayerManager.ObstaclesLayerMask |
| | if using a custom layer mask, the list of layers considered as obstacles by this AI
|
| float | ObstaclesDetectionRaycastLength = 0.5f |
| | the length of the horizontal raycast we should use to detect obstacles that may cause a direction change
|
| 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)
|
| bool | ResetPositionOnDeath = true |
| | if this is true, the character will automatically return to its initial position on revive
|
| InitializationModes | InitializationMode |
| | whether initialization should happen only once, or every time the brain is reset
|
| string | Label |
| | a label you can set to organize your AI Actions, not used by anything else
|
|
| override void | Patrol () |
| | When patrolling we make sure we don't exceed our bounds.
|
| virtual void | CheckForDistance () |
| | Determines whether or not bounds have been exceeded and turns around if needed.
|
| virtual void | EstablishBounds () |
| | Determines the position of the bounds.
|
| virtual void | OnDrawGizmosSelected () |
| | Draws bounds gizmos.
|
| virtual void | CheckForWalls () |
| | Checks for a wall and changes direction if it meets one.
|
| bool | DetectObstaclesRegularLayermask () |
| | Returns true if an obstacle is colliding with this AI, using its controller layer masks.
|
| bool | DetectObstaclesCustomLayermask () |
| | Returns true if an obstacle is in front of the character, using a custom layer mask.
|
| virtual void | CheckForHoles () |
| | Checks for holes.
|
| virtual void | ChangeDirection () |
| | Changes the current movement direction.
|
| virtual void | OnRevive () |
| | When reviving we make sure our directions are properly setup.
|
| virtual void | OnEnable () |
| | On enable we start listening for OnRevive events.
|
| virtual void | OnDisable () |
| | On disable we stop listening for OnRevive events.
|
| virtual void | Awake () |
| | On Awake we grab our AIBrain.
|
Inherits from AIActionPatrol but also lets you define left and right bounds that the character can't exceed.
◆ BoundsMethods
BoundsMethods determine whether the bounds will be defined based on the starting position of the Character, or the position it was at when entering the state.
| Enumerator |
|---|
| BasedOnOriginPosition | |
| BasedOnStateEnterPosition | |
◆ CheckForDistance()
| virtual void MoreMountains.CorgiEngine.AIActionPatrolWithinBounds.CheckForDistance |
( |
| ) |
|
|
protectedvirtual |
Determines whether or not bounds have been exceeded and turns around if needed.
◆ EstablishBounds()
| virtual void MoreMountains.CorgiEngine.AIActionPatrolWithinBounds.EstablishBounds |
( |
| ) |
|
|
protectedvirtual |
Determines the position of the bounds.
◆ Initialization()
| override void MoreMountains.CorgiEngine.AIActionPatrolWithinBounds.Initialization |
( |
| ) |
|
|
virtual |
◆ OnDrawGizmosSelected()
| virtual void MoreMountains.CorgiEngine.AIActionPatrolWithinBounds.OnDrawGizmosSelected |
( |
| ) |
|
|
protectedvirtual |
◆ OnEnterState()
| override void MoreMountains.CorgiEngine.AIActionPatrolWithinBounds.OnEnterState |
( |
| ) |
|
|
virtual |
◆ OnExitState()
| override void MoreMountains.CorgiEngine.AIActionPatrolWithinBounds.OnExitState |
( |
| ) |
|
|
virtual |
◆ Patrol()
| override void MoreMountains.CorgiEngine.AIActionPatrolWithinBounds.Patrol |
( |
| ) |
|
|
protectedvirtual |
◆ _boundsLeft
| Vector3 MoreMountains.CorgiEngine.AIActionPatrolWithinBounds._boundsLeft |
|
protected |
◆ _boundsRight
| Vector3 MoreMountains.CorgiEngine.AIActionPatrolWithinBounds._boundsRight |
|
protected |
◆ _init
| bool MoreMountains.CorgiEngine.AIActionPatrolWithinBounds._init = false |
|
protected |
◆ _initialPosition
| Vector3 MoreMountains.CorgiEngine.AIActionPatrolWithinBounds._initialPosition |
|
protected |
◆ BoundsExtentsLeft
| float MoreMountains.CorgiEngine.AIActionPatrolWithinBounds.BoundsExtentsLeft |
the max distance the character can patrol to the left
◆ BoundsExtentsRight
| float MoreMountains.CorgiEngine.AIActionPatrolWithinBounds.BoundsExtentsRight |
the max distance the character can patrol to the right
◆ BoundsMethod
The documentation for this class was generated from the following file: