Meta Quest Occlusion feature
The Meta Quest Occlusion feature allows mixed reality content in your app to appear hidden or partially obscured behind objects in the physical environment. Without occlusion, geometry in your scene will always render on top of physical objects in your Passthrough layer, regardless of their difference in depth.
This page is a supplement to the AR Foundation Occlusion manual. The following sections only contain information about APIs where Meta Quest exhibits unique platform-specific behavior.
Tip
When developing an AR app, refer to both the AR Foundation documentation as well as the required packages for each platform you support.
Enable occlusion
To enable occlusion in your app:
- Go to Project Settings > XR Plug-in Management > OpenXR.
- Select either the Windows, Mac, Linux settings tab to configure Quest Link on Windows, or the Android settings tab to configure builds for Meta Quest devices.
- Under the OpenXR Feature Groups heading, select the Meta Quest feature group.
- If disabled, enable the Meta Quest: Occlusion OpenXR feature.
The Meta Quest feature group, shown with all features enabled.
Permissions
Your app's user must grant an Android system permission before you can access occlusion data. Refer to Permissions for more information.
Hand removal
The Meta Quest Occlusion feature supports the ability to remove the user's hands from the environment depth map. Enable hand removal if your project uses a separate occlusion method for hands.
To enable hand removal:
- Go to the Meta Quest: Occlusion feature in XR Plug-in Management for your desired build target.
- Click the Gear icon (⚙), located on the right side of the Meta Quest: Occlusion feature.
- Under Feature Settings in the popup window, check the Enable Hand Removal checkbox.
Enable hand removal.
If the device does not support hand removal, Enable Hand Removal has no effect, and the Meta Quest Occlusion feature logs relevant information to the console.
Scripting API
The Meta Quest Occlusion feature contains the following APIs that you can use to control hand removal:
The following example code shows you how to get the Meta Quest Occlusion instance and enable hand removal at runtime:
It looks like the sample you are looking for does not exist.