Modifica

Condividi tramite


CameraExtensions.IsInFOVCone(Camera, Vector3, Single) Method

Definition

Returns true if a point is in the a cone inscribed into the Camera's frustum, false otherwise The cone is inscribed to a radius equal to the vertical height of the camera's FOV. By default, the cone's tip is "chopped off" by an amount defined by the camera's far and near clip planes.

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
point
UnityEngine.Vector3

Point to test

coneAngleBufferDegrees
Single

Degrees to expand the cone radius by.

Returns

Applies to