C Specification

The XrEnvironmentRaycastHitMETA structure is defined as:

// Provided by XR_META_environment_raycast
typedef struct XrEnvironmentRaycastHitMETA {
    XrStructureType                      type;
    const void*                          next;
    XrEnvironmentRaycastHitStatusMETA    status;
    XrPosef                              pose;
} XrEnvironmentRaycastHitMETA;

Members

Member Descriptions

The XrEnvironmentRaycastHitMETA contains information about where the closest hit was found.

Description

The runtime must set the XrPosef::position of the pose to the point where the ray specified in XrEnvironmentRaycastHitGetInfoMETA intersected with the environment. If the ray intersects with the environment at multiple points, XrPosef::position must be set to the first point of intersection when traveling from XrEnvironmentRaycastHitGetInfoMETA::origin in the XrEnvironmentRaycastHitGetInfoMETA::direction direction.

The XrPosef::orientation of the pose must represent the best estimate of the of the normal of the surface hit by the ray. The normal vector is calculated by rotating {0, 0, 1} by this orientation. Rotating the vector {0, 1, 0} with XrPosef::orientation must result in a vector that roughly points in the direction of the ray origin.

Valid Usage (Implicit)

See Also

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 2014-2026 The Khronos Group Inc.