Hi there, I actually found a way to do this via the layerRenderer state!
For reference:
func renderLoop() async throws {
// Render loop.
while true {
if self._layerRenderer.state == .invalidated {
// background.
} else if self._layerRenderer.state == .paused {
// inactive
} else {
// active
}
}
}
Post
Replies
Boosts
Views
Activity
Note that this "issue" can be reproduced with the official sample code:
https://developer.apple.com/documentation/compositorservices/interacting_with_virtual_content_blended_with_passthrough
Hey! I wanted to raise this as I'm also encountering this problem. My app encourages users to use their hands (including spatial pinch gestures) and it's is indeed subject to numerous false positive triggers.
For full context, the app uses an ImmersiveSpace with Metal in .mixed mode and I wish the control center gesture in that specific scenario would be triggered with the gaze looking up.
Maybe related feedback:
FB14593652 - persistentSystemOverlays(.hidden) doesn't always disable the visionOS 2 home gesture in an immersive space
=> https://developer.apple.com/documentation/swiftui/view/persistentsystemoverlays(_:)