This Decision will return true if a target is found in a ray or boxcast in the specified direction.
More...
|
| override void | Initialization () |
| | On Init we grab our character.
|
| override bool | Decide () |
| | On Decide we look for a target.
|
| bool | Decide () |
| | Decide will be performed every frame while the Brain is in a state this Decision is in. Should return true or false, which will then determine the transition's outcome.
|
| virtual void | OnEnterState () |
| | Meant to be overridden, called when the Brain enters a State this Decision is in.
|
| virtual void | OnExitState () |
| | Meant to be overridden, called when the Brain exits a State this Decision is in.
|
|
| DetectMethods | DetectMethod = DetectMethods.Ray |
| | the detection method
|
| float | RayWidth = 1f |
| | the width of the ray to cast (if we're in WideRay mode only
|
| float | DetectionDistance = 10f |
| | the distance up to which we'll cast our rays
|
| Vector3 | DetectionOriginOffset = new Vector3(0,0,0) |
| | the offset to apply to the ray(s)
|
| LayerMask | TargetLayer |
| | the layer(s) on which we want to search a target on
|
| LayerMask | ObstaclesLayer = LayerManager.ObstaclesLayerMask |
| | the layer(s) on which obstacles are set. Obstacles will block the ray
|
| Transform | ReferenceTransform |
| | a transform to use as the rotation reference for detection raycasts. If you have a rotating model for example, you'll want to set it as your reference transform here.
|
| bool | ForceAimToDetectionDirection = false |
| | if this is true, this decision will force the weapon to aim in the detection direction
|
| bool | SetTargetToNullIfNoneIsFound = true |
| | if this is true, this decision will set the AI Brain's Target to null if no target is found
|
| string | Label |
| | a label you can set to organize your AI Decisions, not used by anything else
|
|
| virtual bool | DetectTarget () |
| | Returns true if a target is found by the ray.
|
| virtual void | ForceDirection () |
| | Forces the weapon to aim in the selected direction if needed.
|
| virtual void | OnDrawGizmos () |
| | Draws ray gizmos.
|
| virtual void | Awake () |
| | On Awake we grab our Brain.
|
This Decision will return true if a target is found in a ray or boxcast in the specified direction.
◆ DetectMethods
the possible detection methods
◆ Decide()
| override bool MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.Decide |
( |
| ) |
|
On Decide we look for a target.
- Returns
◆ DetectTarget()
| virtual bool MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.DetectTarget |
( |
| ) |
|
|
protectedvirtual |
Returns true if a target is found by the ray.
- Returns
◆ ForceDirection()
| virtual void MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.ForceDirection |
( |
| ) |
|
|
protectedvirtual |
Forces the weapon to aim in the selected direction if needed.
◆ Initialization()
| override void MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.Initialization |
( |
| ) |
|
|
virtual |
◆ OnDrawGizmos()
| virtual void MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.OnDrawGizmos |
( |
| ) |
|
|
protectedvirtual |
◆ _character
| Character MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D._character |
|
protected |
◆ _characterHandleWeapon
◆ _direction
| Vector3 MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D._direction |
|
protected |
◆ _distanceToTarget
| float MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D._distanceToTarget |
|
protected |
◆ _gizmoCenter
| Vector3 MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D._gizmoCenter |
|
protected |
◆ _gizmosColor
| Color MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D._gizmosColor = Color.yellow |
|
protected |
◆ _gizmoSize
| Vector3 MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D._gizmoSize |
|
protected |
◆ _init
| bool MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D._init = false |
|
protected |
◆ _raycastOrigin
| Vector3 MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D._raycastOrigin |
|
protected |
◆ DetectionDistance
| float MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.DetectionDistance = 10f |
the distance up to which we'll cast our rays
◆ DetectionOriginOffset
| Vector3 MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.DetectionOriginOffset = new Vector3(0,0,0) |
the offset to apply to the ray(s)
◆ DetectMethod
◆ ForceAimToDetectionDirection
| bool MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.ForceAimToDetectionDirection = false |
if this is true, this decision will force the weapon to aim in the detection direction
◆ ObstaclesLayer
| LayerMask MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.ObstaclesLayer = LayerManager.ObstaclesLayerMask |
the layer(s) on which obstacles are set. Obstacles will block the ray
◆ RayWidth
| float MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.RayWidth = 1f |
the width of the ray to cast (if we're in WideRay mode only
◆ ReferenceTransform
| Transform MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.ReferenceTransform |
a transform to use as the rotation reference for detection raycasts. If you have a rotating model for example, you'll want to set it as your reference transform here.
◆ SetTargetToNullIfNoneIsFound
| bool MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.SetTargetToNullIfNoneIsFound = true |
if this is true, this decision will set the AI Brain's Target to null if no target is found
◆ TargetLayer
| LayerMask MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.TargetLayer |
the layer(s) on which we want to search a target on
The documentation for this class was generated from the following file: