XR Raycast Subsystem
Raycasts allow you to perform hit testing against AR-specific features. It is conceptually similar to the Physics.Raycast, but raycast targets do not require a presence in the physics world.
There are two types of raycasts:
- Screen point
- Arbitrary ray
Some implementations only support one or the other. You can check for support with the XRRaycastSubsystemDescriptor.
Performing Raycasts
See the Script API Reference for API help. Raycasts are tested aginst specified TrackableTypes, a mask of trackable types against which to raycast, and sorted by distance from the ray's origin.