How to achieve the effect of real objects occluding virtual content in visionOS

In visionOS. mix mode, I place a virtual object on the floor and a chair in front of it, but the chair does not obstruct the virtual object, making the effect unrealistic. How to make chairs and other objects in reality cover virtual objects

Hi!

This week we announce the new Object Tracking workflow and API, if you know which specific object is the desired occluder, you can train your .referenceobject of that object (eg your chair) and detect it during the session. For details on the occlusion see our session: https://developer.apple.com/videos/play/wwdc2024/10101/

and pay attention at around 11:30 in the video where the occlusion is explained. Hope that helps!

How to achieve the effect of real objects occluding virtual content in visionOS
 
 
Q