Class CameraFOVChecker
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
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public static class 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.
Declaration
public static bool IsInFOVCached(this Camera cam, Collider myCollider)
Parameters
Type | Name | Description |
---|---|---|
Camera | cam | |
Collider | myCollider | The collider to test |
Returns
Type | Description |
---|---|
Boolean |