Object Tracking Sample Code

Are you planning on publishing a complete sample code project related to the Explore object tracking for visionOS session (wwdc2024/10101)?

The animation at 12:50 where the globe opens up was especially impressive. Seeing how that was done while tracking to the globe would be very interesting. (I realize that we would have to create our own globe object in order for the code to work.)

Hi @iNick,

I hope you enjoyed the session :)

The procedure to achieve an animation similar to what you observed at 12:50 is really as straightforward as demonstrated in the session video.

The tracking occurs automatically once you create the AnchoringComponent, associate your .referenceobject file to it and add some content on top of it.

It's probably better if you use Reality Composer Pro to do this since you can use the visual cue shown in the viewport to place content more precisely.

However, this could also be done through code using RealityKit using the same logic (i.e. adding an AnchoringComponent, setting it as "object", etc).

Feel free to ask more questions about this.

Hope that helps!

Hey @iNick,

We have released the sample code for this session. Checkout Exploring object tracking with ARKit. If you have additional questions feel free to create a new thread.

Thanks,

Michael

Object Tracking Sample Code
 
 
Q