Passthrough Tutorial
This is a basic tutorial that lets you quickly test the passthrough implementation. We highly recommend that you complete this tutorial to get started with integrating Passthrough in your project.
Before you begin this tutorial, it is important to make sure the following checklist is complete.
- Ready to use Meta Quest 2 or Meta Quest Pro headset. Make sure you have installed the latest software version.
- Latest Unreal LTS version.
- Follow the Unreal setup guide to set up Unreal and create a new project.
- Go to File > New Level > Empty Open World.
- On the Place Actors panel, do the following:
- Go to Shapes > Sphere, and then drag a sphere into the scene.
- Select the sphere and then on the Details tab, set the position (X, Y, Z) to (500, 0, 0) and scale (X, Y, Z) to (0.5, 0.5, 0.5).
- Go to Lights > Point Light, and then drag a Point Light into the scene, set the position (X, Y, Z) to (0, 0, 0).
- Go to Search for Camera Actor and drag it into the scene, set the position (X, Y, Z) to (0, 0, 0).
- Select the camera and then on the Details tab, set Auto Activate for Player to Player 0.
- Open Edit > Project Settings > (in Plugins section) > Meta XR > (under mobile section) > check Passthrough Enabled.
- On the World Outliner tab, select Camera, and then on the Details tab, click Add.
- From the list, select Oculus XR Passthrough Layer.
- Under the Oculus XR Passthrough Layer, in the stereo layer section, set the stereo layer shape to Reconstructed Passthrough Layer.
- Expand Stereo Layer shape and set Layer Placement to Underlay. This enables background passthrough, which means that the physical world appears in the background and it enables placing the virtual 3D object in the front.
- Save project.
Under platforms, click Meta Quest device. Unreal deploys and runs APK on the headset.