TopDown Engine
v3.6
|
This Decision will return true if a target is found in a ray or boxcast in the specified direction More...
Public Types | |
enum | DetectMethods { DetectMethods.Ray, DetectMethods.WideRay } |
the possible detection methods More... | |
Public Member Functions | |
override void | Initialization () |
On Init we grab our character More... | |
override bool | Decide () |
On Decide we look for a target More... | |
Public Member Functions inherited from MoreMountains.Tools.AIDecision | |
virtual void | OnEnterState () |
Meant to be overridden, called when the Brain enters a State this Decision is in More... | |
virtual void | OnExitState () |
Meant to be overridden, called when the Brain exits a State this Decision is in More... | |
Public Attributes | |
DetectMethods | DetectMethod = DetectMethods.Ray |
the detection method More... | |
float | RayWidth = 1f |
the width of the ray to cast (if we're in WideRay mode only More... | |
float | DetectionDistance = 10f |
the distance up to which we'll cast our rays More... | |
Vector3 | DetectionOriginOffset = new Vector3(0,0,0) |
the offset to apply to the ray(s) More... | |
LayerMask | TargetLayer |
the layer(s) on which we want to search a target on More... | |
LayerMask | ObstaclesLayer = LayerManager.ObstaclesLayerMask |
the layer(s) on which obstacles are set. Obstacles will block the ray More... | |
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. More... | |
bool | ForceAimToDetectionDirection = false |
if this is true, this decision will force the weapon to aim in the detection direction More... | |
bool | SetTargetToNullIfNoneIsFound = true |
if this is true, this decision will set the AI Brain's Target to null if no target is found More... | |
Public Attributes inherited from MoreMountains.Tools.AIDecision | |
string | Label |
a label you can set to organize your AI Decisions, not used by anything else More... | |
Protected Member Functions | |
virtual bool | DetectTarget () |
Returns true if a target is found by the ray More... | |
virtual void | ForceDirection () |
Forces the weapon to aim in the selected direction if needed More... | |
virtual void | OnDrawGizmos () |
Draws ray gizmos More... | |
Protected Member Functions inherited from MoreMountains.Tools.AIDecision | |
virtual void | Awake () |
On Awake we grab our Brain More... | |
Protected Attributes | |
Vector3 | _direction |
float | _distanceToTarget |
Vector3 | _raycastOrigin |
Character | _character |
Color | _gizmosColor = Color.yellow |
Vector3 | _gizmoCenter |
Vector3 | _gizmoSize |
bool | _init = false |
CharacterHandleWeapon | _characterHandleWeapon |
Protected Attributes inherited from MoreMountains.Tools.AIDecision | |
AIBrain | _brain |
Additional Inherited Members | |
Properties inherited from MoreMountains.Tools.AIDecision | |
virtual bool | DecisionInProgress [get, set] |
This Decision will return true if a target is found in a ray or boxcast in the specified direction
|
virtual |
|
protectedvirtual |
Returns true if a target is found by the ray
|
protectedvirtual |
Forces the weapon to aim in the selected direction if needed
|
virtual |
On Init we grab our character
Reimplemented from MoreMountains.Tools.AIDecision.
|
protectedvirtual |
Draws ray gizmos
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.DetectionDistance = 10f |
the distance up to which we'll cast our rays
Vector3 MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.DetectionOriginOffset = new Vector3(0,0,0) |
the offset to apply to the ray(s)
DetectMethods MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.DetectMethod = DetectMethods.Ray |
the detection method
bool MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.ForceAimToDetectionDirection = false |
if this is true, this decision will force the weapon to aim in the detection direction
LayerMask MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.ObstaclesLayer = LayerManager.ObstaclesLayerMask |
the layer(s) on which obstacles are set. Obstacles will block the ray
float MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.RayWidth = 1f |
the width of the ray to cast (if we're in WideRay mode only
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.
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
LayerMask MoreMountains.TopDownEngine.AIDecisionDetectTargetLine3D.TargetLayer |
the layer(s) on which we want to search a target on