C Specification
The xrRaycastANDROID function is defined as:
// Provided by XR_ANDROID_raycast
XrResult xrRaycastANDROID(
XrSession session,
const XrRaycastInfoANDROID* rayInfo,
XrRaycastHitResultsANDROID* results);
Parameters
Description
To perform raycasts, the application calls xrRaycastANDROID.
-
If a raycast intersects more trackables than XrRaycastInfoANDROID::
maxResults, the runtime must return the hit results that are closest to the XrRaycastInfoANDROID::originof the ray. -
If a raycast intersects a trackable of type
XR_TRACKABLE_TYPE_PLANE_ANDROID, that is subsumed by another plane, the runtime must return the hit result for the subsuming plane only. -
The runtime must return the hit results in closest-to-farthest order from XrRaycastInfoANDROID::
originalong the XrRaycastInfoANDROID::trajectoryvector. -
The runtime must return
XR_ERROR_TRACKABLE_TYPE_NOT_SUPPORTED_ANDROIDif the trackable type corresponding to the XrTrackableTrackerANDROID handles in XrRaycastInfoANDROID::trackersare not enumerated by xrEnumerateRaycastSupportedTrackableTypesANDROID.
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.