visionOS XR implementation for rendering in immersive mode, hand tracking, and controller tracking. This is a visionOS XR implementation. It has three modules: - the CompositorServices module, to render with Godot in immersive mode - the hand tracking module, using Apple's ARKit - the spatial controller module, using Apple's ARKit and GCController. Those modules can be enabled/disabled independently. The rendering module uses the CompositorServices framework to render an Immersive scene. It supports the full and mixed immersion modes. To use this module, you must set the [member EditorExportPlatformVisionOS.application/app_role] export setting to [code]Immersive[/code]. You can choose the immersion style using the [member EditorExportPlatformVisionOS.application/immersion_style] export setting. You must use the Metal rendering driver, and only the Mobile renderer is supported for now. You can initialize this interface in the [method Node._ready] method of any of your nodes as follows: [codeblock] func _ready() -> void: var interface = XRServer.find_interface("visionOS") if interface and interface.initialize(): var viewport : Viewport = get_viewport() viewport.use_xr = true viewport.vrs_mode = Viewport.VRS_XR viewport.use_hdr_2d = true [/codeblock] Do not initialize the XR interface in the [method Node._process] method, as this will initialize it at some unspecified point in the middle of the frame rendering, possibly causing incorrect visionOS API usage. Enable the hand tracking module with the [member ProjectSettings.xr/visionos/enable_hand_tracking] project setting. It will populate the [code]"/user/hand_tracker/left"[/code] and [code]"/user/hand_tracker/right"[/code] XRHandTrackers. Enable the spatial controller module using the [member ProjectSettings.xr/visionos/enable_controller_tracking] project setting. It will populate the [code]"left_hand"[/code] and [code]"right_hand"[/code] reserved XRController trackers. Immersion style of the immersive scene. Its initial value comes from the [member EditorExportPlatformVisionOS.application/immersion_style] export setting. Visibility of the system overlays, such as the Home indicator. Its initial value comes from the [member ProjectSettings.xr/visionos/persistent_system_overlays] project setting. See [url=https://developer.apple.com/documentation/swiftui/view/persistentsystemoverlays(_:)]persistentSystemOverlays(_:)[/url]. Visibility of the user's upper limbs. Its initial value comes from the [member ProjectSettings.xr/visionos/upper_limb_visibility] project setting. See [url=https://developer.apple.com/documentation/swiftui/scene/upperlimbvisibility(_:)]upperLimbVisibility(_:)[/url]. The rendered content replaces the passthrough view of the real environment. The rendered content is displayed along with the passthrough view of the real environment. The rendered content is displayed in a portal whose immersion level the user controls with the Digital Crown. The system decides whether the element is visible. The element is visible. The element is hidden.