Disabling New Hand Gesture Features in Vision Pro App on visionOS 2

Question: Hi everyone,

I'm developing a Vision Pro app using the latest visionOS 2, and I've encountered some issues with the new hand gestures introduced in this update. My app is designed to display a UI element when a user's palm is detected. However, the new hand gestures for navigating key functions like Home View, Control Center, and adjusting the volume are interfering with my app's functionality.

What I'm Trying to Achieve Detect when a user's palm is open and display a UI element. Ensure that my app's custom hand gestures are not disturbed by the new default gestures in visionOS 2. Problem The new hand gestures in visionOS 2 (such as those for Home View, Control Center, and volume adjustment) are activating while my app is open, causing disruptions to my app's functionality. I want to disable these system-level gestures when my app is running.

Answered by Vision Pro Engineer in 790983022
Accepted Answer

I’m having trouble building my app due to the persistentSystemOverlays(.hidden) modifier, which is only available in visionOS 2.0 or newer. As shown in the attached screenshot, the line prevents me from building the project.

I’ve tried using conditional logic to apply this modifier only on visionOS 2.0 or later, but I haven’t had any success. Does anyone have experience with this issue? How can I conditionally apply this modifier or ensure compatibility across visionOS versions?

Any guidance or examples would be greatly appreciated.

When I perform a Tap gesture, the Menu Hand Gestures keep appearing.

Could you please advise how to modify this?

Disabling New Hand Gesture Features in Vision Pro App on visionOS 2
 
 
Q