Develop
Develop
Select your platform

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

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.

1. Create Unreal project

  1. Follow the Unreal setup guide to set up Unreal and create a new project.
  2. Go to File > New Level > Empty Open World.

2. Add 3D Objects

  1. 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).
  2. Select the camera and then on the Details tab, set Auto Activate for Player to Player 0.

3. Integrate Passthrough

  1. Open Edit > Project Settings > (in Plugins section) > Meta XR > (under mobile section) > check Passthrough Enabled.
  2. On the World Outliner tab, select Camera, and then on the Details tab, click Add.
  3. From the list, select Oculus XR Passthrough Layer.
  4. Under the Oculus XR Passthrough Layer, in the stereo layer section, set the stereo layer shape to Reconstructed Passthrough Layer.
  5. 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.
Passthrough Layer Setup

4. Build and Test

  1. Save project.
  2. Under platforms, click Meta Quest device. Unreal deploys and runs APK on the headset.
    Passthrough tutorial output
Did you find this page helpful?