If you’re new to working with QR codes, you may want to review our QR code tracking overview.
The HoloLens 2 can see QR codes in world space using the webcam, which renders them as holograms at each code’s real-world position. HoloLens 2 can also render holograms in the same location on multiple devices to create a shared experience. Make sure you’re following the best practices for adding QR codes to your applications:
Pay special attention to the environment considerations when QR codes are being placed in your app. You can find more information on each of these topics and instructions on how to download the required NuGet package in our QR code tracking overview document.
[!CAUTION] QR codes are the only type of images that can be tracked by HoloLens out of the box - Unreal’s UARTrackedImage module isn’t supported on HoloLens. If you need to track custom images, you can access the device’s webcam and process images using a third party image recognition library.
Since the HoloLens 2 needs to use the webcam to see QR codes, you’ll need to enable it in the project settings:
QR codes are surfaced through Unreal’s AR tracked geometry system as a tracked image. To get this working, you’ll need to:
The Event Graph in the following image shows the OnUpdateTrackedImage event being used to render a point in the center of a QR code and print out its data.
Here’s what’s going on:
You can also get the coordinate system for a QR code in code.
Every QR code has a unique guid ID, which you can find by:
If you’re following the Unreal development checkpoint journey we’ve laid out, you can proceed to the next topic:
[!div class=”nextstepaction”] WinRT
Or jump directly to deploying your app on a device or emulator:
[!div class=”nextstepaction”] Deploying to device
You can always go back to the Unreal development checkpoints at any time.