Ray casts
This page is a supplement to the AR Foundation Ray casts manual. The following sections only contain information about APIs where Meta Quest exhibits unique platform-specific behavior.
Tip
When developing an AR app, refer to both the AR Foundation documentation as well as the required packages for each platform you support.
Ray cast architecture
Meta OpenXR defines an empty implementation of AR Foundation's XRRaycastSubsystem.Provider. This implementation doesn't provide any OpenXR functionality. The empty ray cast provider enables a fallback Unity-world-space ray cast implementation in AR Foundation's ARRaycastManager.
Important
If your app uses AR ray casts, you should use the ARRaycastManager APIs. Don't access MetaOpenXRRaycastSubsystem
directly.
The following sections outline the features Meta OpenXR supports using the ARRaycastManager
.
Optional feature support
Meta OpenXR implements the following optional features of AR Foundation's XRRaycastSubsystem:
Feature | Descriptor Property | Supported |
---|---|---|
Viewport based raycast | supportsViewportBasedRaycast | |
World based raycast | supportsWorldBasedRaycast | Yes |
Tracked raycasts | supportsTrackedRaycasts |
Supported trackables
Meta OpenXR supports ray casting against the following trackable types:
TrackableType | Supported |
---|---|
BoundingBox | Yes |
Depth | |
Face | |
FeaturePoint | |
Image | |
Planes | |
PlaneEstimated | |
PlaneWithinBounds | Yes |
PlaneWithinInfinity | |
PlaneWithinPolygon |
Note
Refer to AR Foundation Ray cast platform support for more information on the optional features of the Raycast subsystem.