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.

Did you find the answers you were looking for? I felt the video was very incomplete in its instructions.

Object Tracking with RealtyView
 
 
Q