Skip to content

fix: meta quest controller support#327

Merged
doranteseduardo merged 6 commits into
mainfrom
develop
May 10, 2026
Merged

fix: meta quest controller support#327
doranteseduardo merged 6 commits into
mainfrom
develop

Conversation

@doranteseduardo
Copy link
Copy Markdown
Member

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.

  • Added HoverPending state and kHoverHysteresisMillis to VROInputControllerBase, 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.

  • Added ios/Podfile.visionos for visionOS CocoaPods integration, and updated ViroKit.podspec to declare visionOS deployment target and frameworks (Metal, MetalKit, CompositorServices, ARKit). [1] [2]
  • Added ios/ViroKit-visionOS.xcconfig to 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 VRODriverVisionOS class implementing the rendering backend for visionOS, using Metal and CompositorServices, with stubs or minimal implementations for unsupported features.

  • Added VRODriverVisionOS.h in the VisionOS subdirectory, 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.

@doranteseduardo doranteseduardo changed the title Develop fix: meta quest controller support May 10, 2026
@doranteseduardo doranteseduardo merged commit e834d95 into main May 10, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant