![]() |
FCV Engine 0.1
A tool and framework for tutorials in game development
|
A utility class for handling Field of View (FOV) calculations and visualizations in Unity. Includes functions to check if a target is within the FOV and range, and to draw the FOV in the scene view. More...
Static Public Member Functions | |
static bool | IsWithinFOVAndRange (Vector3 source, Vector3 target, Vector3 direction, float maxDistance, float fovAngle) |
Checks if the target is within the Field of View and range of the source. | |
static bool | IsWithinFOV (Vector3 source, Vector3 target, Vector3 direction, float fovAngle) |
Checks whether a position is within a Field of View angle from another position. | |
A utility class for handling Field of View (FOV) calculations and visualizations in Unity. Includes functions to check if a target is within the FOV and range, and to draw the FOV in the scene view.
Definition at line 10 of file FOVUtility.cs.
|
static |
Checks whether a position is within a Field of View angle from another position.
source | The source position. |
target | The target position. |
direction | The direction from the source to check the angle from. |
fovAngle | The angle in degrees. |
Definition at line 71 of file FOVUtility.cs.
|
static |
Checks if the target is within the Field of View and range of the source.
source | The position of the source. |
target | The position of the target. |
direction | The direction from the source to check the FOV angle from. |
maxDistance | The maximum distance for the FOV check. |
fovAngle | The angle of the FOV in degrees. |
Definition at line 46 of file FOVUtility.cs.