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.
Optional feature support
This package 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 |
Note
Refer to AR Foundation Ray cast platform support for more information on the optional features of the Raycast subsystem.
Supported trackables
This package supports ray casting against the following trackable types:
TrackableType | Supported |
---|---|
BoundingBox | Fallback |
Depth | Yes |
Face | |
FeaturePoint | |
Image | |
Planes | |
PlaneEstimated | |
PlaneWithinBounds | Fallback |
PlaneWithinInfinity | |
PlaneWithinPolygon | Fallback |
Fallback ray casts
Ray cast functionality in Unity OpenXR: Meta relies on both Meta's OpenXR runtime and AR Foundation's Fallback ray casts implementation. Meta's OpenXR runtime supports ray casts against the Depth trackable type. AR Foundation additionally enables you to Unity-world-space ray cast against the PlaneWithinPolygon, PlaneWithinBounds, and BoundingBox trackable types.
Important
If your app uses AR ray casts, you should use the ARRaycastManager APIs. Don't access MetaOpenXRRaycastSubsystem
directly.