fix: meta quest controller support#327
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces major improvements to the ViroKit rendering engine, focusing on two main areas: (1) adding robust hover event hysteresis to improve user experience in OpenXR/visionOS controller interactions, and (2) introducing visionOS build system and platform support, including a new Metal-based driver and platform-specific configuration. These changes address issues with flickering hover states and unreliable click registration due to controller jitter, and lay the foundation for visionOS compatibility by excluding iOS-only code and providing a new Metal/CompositorServices backend.
1. Input Controller Hover Hysteresis and Click Stickiness
Significantly improves the reliability of hover and click events for OpenXR/visionOS controllers by introducing a 75ms hysteresis window. This absorbs short-term raycast jitter, preventing unwanted hover exits and ensuring clicks are routed to the intended node even if the pointer briefly jitters off target. This eliminates the need for repeated clicks to register an action and prevents flickering hover states.
HoverPendingstate andkHoverHysteresisMillistoVROInputControllerBase, tracking pending hover transitions per input source. Hover exit/enter events are now deferred until the candidate node persists for the hysteresis window, and click events during this window are routed to the last hovered node. [1] [2] [3] [4] [5]2. visionOS Platform and Build System Integration
Enables ViroKit to build and run on visionOS by introducing platform-specific configuration, dependency management, and source exclusions for iOS-only features.
ios/Podfile.visionosfor visionOS CocoaPods integration, and updatedViroKit.podspecto declare visionOS deployment target and frameworks (Metal, MetalKit, CompositorServices, ARKit). [1] [2]ios/ViroKit-visionOS.xcconfigto exclude iOS-only source files from the visionOS build, set Metal as the rendering backend, and configure linker and header search paths for xros/xrsimulator.3. Metal/CompositorServices Backend for visionOS
Introduces a new
VRODriverVisionOSclass implementing the rendering backend for visionOS, using Metal and CompositorServices, with stubs or minimal implementations for unsupported features.VRODriverVisionOS.hin theVisionOSsubdirectory, providing a Metal-based driver with visionOS-specific overrides for rendering, resource management, and event handling.These changes collectively improve input reliability on controller-based platforms and establish a robust foundation for future visionOS support in ViroKit.