Add to a GameObject that has a FactionMember. More...
Public Member Functions | |
virtual bool | CanSee (FactionMember actor, Dimension dimension) |
Public Attributes | |
FieldOfView[] | fieldsOfView = new FieldOfView[0] |
The sensor's fields of view (FOVs). | |
float[] | extraRaycastHeights = new float[0] |
Extra heights at which to run raycast checks in addition to the target's local origin. | |
LayerMask | seeThroughLayer |
FactionMember | factionMember |
Transform | raySource |
Dimension | dimension = Dimension.Is3D |
bool | hasCheckedEver = false |
Vector3 | lastPointChecked |
string | lastPointGizmoName = string.Empty |
Static Public Attributes | |
static readonly FieldOfView | CentralFOV = new FieldOfView(45f, 120f, 20f, new Color(1, 1, 1, 0.3f)) |
static readonly FieldOfView | WideFOV = new FieldOfView(120f, 120f, 15f, new Color(1, 1, 1, 0.2f)) |
static readonly FieldOfView | PeripheralFOV = new FieldOfView(180f, 120f, 5f, new Color(1, 1, 1, 0.1f)) |
Protected Member Functions | |
virtual void | Reset () |
virtual void | Awake () |
virtual void | Start () |
virtual bool | IsInFOVs (Transform target, Dimension dimension) |
virtual bool | IsInLineOfSight (Transform target, Dimension dimension) |
virtual bool | RaycastHitTarget (Transform target, Vector3 rayStart, Vector3 rayEnd, Dimension dimension) |
bool | IsInLayerMask (int layer, LayerMask layerMask) |
Protected Attributes | |
RaycastHit2D[] | hits2D = new RaycastHit2D[MaxHits] |
Static Protected Attributes | |
const int | MaxHits = 20 |
Add to a GameObject that has a FactionMember.
Provides a more advanced implementation for FactionMember.CanSee that offers multiple fields of view and visual debug inforomation in the Scene view.
|
inlineprotectedvirtual |
|
inlinevirtual |
|
inlineprotectedvirtual |
|
inlineprotected |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
static |
Dimension PixelCrushers.LoveHate.CanSeeAdvanced.dimension = Dimension.Is3D |
float [] PixelCrushers.LoveHate.CanSeeAdvanced.extraRaycastHeights = new float[0] |
Extra heights at which to run raycast checks in addition to the target's local origin.
When trying to see a humanoid, you might want to run raycasts to its feet, abdomen, and head. The feet and abdomen might be blocked by a low wall, but the head could be visible above it.
FactionMember PixelCrushers.LoveHate.CanSeeAdvanced.factionMember |
FieldOfView [] PixelCrushers.LoveHate.CanSeeAdvanced.fieldsOfView = new FieldOfView[0] |
The sensor's fields of view (FOVs).
bool PixelCrushers.LoveHate.CanSeeAdvanced.hasCheckedEver = false |
|
protected |
Vector3 PixelCrushers.LoveHate.CanSeeAdvanced.lastPointChecked |
string PixelCrushers.LoveHate.CanSeeAdvanced.lastPointGizmoName = string.Empty |
|
staticprotected |
|
static |
Transform PixelCrushers.LoveHate.CanSeeAdvanced.raySource |
LayerMask PixelCrushers.LoveHate.CanSeeAdvanced.seeThroughLayer |
|
static |