Object Tracking with RealtyView

When I wanted to call the Reality Composer Pro scene containing Object Tracking, I tried the following code:


        RealityView { content in
            if let model = try? await Entity(named: "Scene", in: realityKitContentBundle) {
                content.add(model)
            }
        }

Obviously, this is wrong. We need to add some configurations that can enable Object Tracking to Reality View. What do we need to add?

Hi, you can checkout this session for a step to step guide on how to use the object tracking feature on visionOS. https://developer.apple.com/videos/play/wwdc2024/10101/

Or use the new RealityKit or ARKit api to setup the same thing in code.

Object Tracking with RealtyView
 
 
Q