CameraExtensions.IsInFOVCone(Camera, Vector3, Single) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Test if a point in the cone inscribed into the view frustum of the given camera.
public static bool IsInFOVCone(this UnityEngine.Camera camera, UnityEngine.Vector3 point, float coneAngleBufferDegrees = 0);
static member IsInFOVCone : UnityEngine.Camera * UnityEngine.Vector3 * single -> bool
<Extension()>
Public Function IsInFOVCone (camera As Camera, point As Vector3, Optional coneAngleBufferDegrees As Single = 0) As Boolean
Parameters
- camera
- UnityEngine.Camera
The camera to check the point against.
- point
- UnityEngine.Vector3
Point to test
- coneAngleBufferDegrees
- Single
Degrees to expand the cone radius by.
Returns
true if the given point is in the cone inscribed into the view frustum of the given camera, otherwise false.
Remarks
The cone is inscribed to a radius equal to the vertical height of the camera's field of view. By default, the cone's tip is severed by an amount defined by the camera's far and near clip planes.