Sets the active play area mode, will return [code]false[/code] if the mode can't be used with this interface.
Sets the active play area mode, will return [code]false[/code] if the mode can't be used with this interface.
[b]Note:[/b] Changing this after the interface has already been initialized can be jarring for the player, so it's recommended to recenter on the HMD with [method XRServer.center_on_hmd] (if switching to [constant XRInterface.XR_PLAY_AREA_STAGE]) or make the switch during a scene change.
You should call this method after a few seconds have passed. For example, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.
You should call this method after a few seconds have passed. For example, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism.
print_verbose("OpenXR: LOCAL_FLOOR space isn't supported, emulating using STAGE and LOCAL spaces.");
// Fallback on LOCAL, which all OpenXR runtimes are required to support.
print_verbose(String("OpenXR: ")+OpenXRUtil::get_reference_space_name(requested_reference_space)+String(" isn't supported, defaulting to LOCAL space."));
// after xrWaitFrame(), so just set this flag for now.
if(XR_FAILED(result)){
should_reset_emulated_floor_height=true;
print_line("OpenXR: Failed to create play space [",get_error_string(result),"]");
returnfalse;
}
}else{
// If we've previously created a play space, clean it up first.
// Fallback on LOCAL, which all OpenXR runtimes are required to support.
if(play_space!=XR_NULL_HANDLE){
print_verbose(String("OpenXR: ")+OpenXRUtil::get_reference_space_name(requested_reference_space)+String(" isn't supported, defaulting to LOCAL space."));