編輯

共用方式為


MathUtilities.IsInFOV Method

Definition

Returns if a point lies within a frame of reference view as defined by arguments

public:
 static bool IsInFOV(UnityEngine::Vector3 testPosition, UnityEngine::Transform ^ frameOfReference, float verticalFOV, float horizontalFOV, float minPlaneDistance, float maxPlaneDistance);
public static bool IsInFOV (UnityEngine.Vector3 testPosition, UnityEngine.Transform frameOfReference, float verticalFOV, float horizontalFOV, float minPlaneDistance, float maxPlaneDistance);
static member IsInFOV : UnityEngine.Vector3 * UnityEngine.Transform * single * single * single * single -> bool
Public Shared Function IsInFOV (testPosition As Vector3, frameOfReference As Transform, verticalFOV As Single, horizontalFOV As Single, minPlaneDistance As Single, maxPlaneDistance As Single) As Boolean

Parameters

testPosition
UnityEngine.Vector3
frameOfReference
UnityEngine.Transform
verticalFOV
Single
horizontalFOV
Single
minPlaneDistance
Single
maxPlaneDistance
Single

Returns

Remarks

Field of view parameters are in degrees and plane distances are in meters

Applies to