ViewCone
A class in Root.Township, the global namespace.
A cone along the object's forward axis, used by AI to check whether a point is in view.
- Listed in Global namespace: T to X
- Inherits or implements
MonoBehaviour - Attributes
ExecuteInEditMode
Constructors
| Member | What it is |
|---|---|
ViewCone() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
Properties
| Member | What it is |
|---|---|
bool IsActive { get; set; } | When false, Contains always returns false. |
Methods
| Member | What it is |
|---|---|
bool Contains(Vector3 point, out float ratio) | Whether a point is inside the cone. ratio is 0 at the centre and 1 at the edge. |
2 private and internal methods
Used in
Members of other types that take, return or hold a ViewCone: