Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
XRInterface¶
Inherits: RefCounted < Object
Inherited By: MobileVRInterface, OpenXRInterface, WebXRInterface, XRInterfaceExtension
Base class for an XR interface implementation.
Description¶
This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDExtension modules. Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform.
Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through XRServer.
Tutorials¶
Properties¶
|
||
|
||
|
||
|
Methods¶
get_capabilities ( ) const |
|
get_name ( ) const |
|
get_play_area ( ) const |
|
get_projection_for_view ( int view, float aspect, float near, float far ) |
|
get_system_info ( ) |
|
get_tracking_status ( ) const |
|
get_transform_for_view ( int view, Transform3D cam_transform ) |
|
get_view_count ( ) |
|
initialize ( ) |
|
is_initialized ( ) const |
|
set_play_area_mode ( PlayAreaMode mode ) |
|
void |
stop_passthrough ( ) |
supports_play_area_mode ( PlayAreaMode mode ) |
|
void |
trigger_haptic_pulse ( String action_name, StringName tracker_name, float frequency, float amplitude, float duration_sec, float delay_sec ) |
void |
uninitialize ( ) |
Signals¶
play_area_changed ( int mode )
Emitted when the play area is changed. This can be a result of the player resetting the boundary or entering a new play area, the player changing the play area mode, the world scale changing or the player resetting their headset orientation.
Enumerations¶
enum Capabilities:
Capabilities XR_NONE = 0
No XR capabilities.