編集

次の方法で共有


CameraFOVChecker Class

Definition

Camera extension methods to test if colliders are within camera's FOV. Uses caching to improve performance and ensure values are only computed once per frame

public ref class CameraFOVChecker abstract sealed
public static class CameraFOVChecker
type CameraFOVChecker = class
Public Module CameraFOVChecker
Inheritance
CameraFOVChecker

Methods

IsInFOVCached(Camera, Collider)

Returns true if a collider's bounds is within the camera FOV. Utilizes a cache to test if this collider has been seen before and returns current frame's calculated result. NOTE: This is a 'loose' FOV check -- it can return true in cases when the collider is actually not in the FOV because it does an axis-aligned check when testing for large colliders. So, if the axis aligned bounds are in the bounds of the camera, it will return true.

Applies to