C Specification
The XrEventDataUserPresenceChangedEXT structure is defined as:
// Provided by XR_EXT_user_presence
typedef struct XrEventDataUserPresenceChangedEXT {
    XrStructureType    type;
    const void*        next;
    XrSession          session;
    XrBool32           isUserPresent;
} XrEventDataUserPresenceChangedEXT;Members
Description
The XrEventDataUserPresenceChangedEXT event is queued for retrieval using xrPollEvent when the user presence is changed, as well as when a session starts running.
Receiving XrEventDataUserPresenceChangedEXT with the
isUserPresent is XR_TRUE indicates that the system has detected
the presence of a user in the XR experience.
For example, this may indicate that the user has put on the headset, or has
entered the tracking area of a non-head-worn XR system.
Receiving XrEventDataUserPresenceChangedEXT with the
isUserPresent is XR_FALSE indicates that the system has detected
the absence of a user in the XR experience.
For example, this may indicate that the user has removed the headset or has
stepped away from the tracking area of a non-head-worn XR system.
The runtime must queue this event upon a successful call to the
xrBeginSession function, regardless of the value of
isUserPresent, so that the application can be in sync on the state
when a session begins running.
The runtime must return a valid XrSession handle for a running session.
After the application calls xrEndSession, a running
session is ended and the runtime must not enqueue any more user presence
events.
Therefore, the application will no longer observe any changes of the
isUserPresent until another running session.
| Note | Note This extension does not require any specific correlation between user presence state and session state except that the XrEventDataUserPresenceChangedEXT event can not be observed without a running session. A runtime may choose to correlate the two states or keep them independent. | 
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
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.