ARKit 3 updated version of scanning and detecting 3d objects

Hi, I'm working with a team on using RealityKit/ARKit 3 and SwiftUI to create our first AR App. I was wondering whether there was an updated version of this https://developer.apple.com/documentation/arkit/scanning_and_detecting_3d_objects as it looks very helpful but uses scenekit. Is the recommended approach to use both RealityKit and SceneKit together to get this to work or can someone provide some insight on how to convert the snippet from scenekit to realitykit. This is all very new to me!

Replies

There is not an updated version of that specific sample code, but there are several RealityKit samples available:


https://developer.apple.com/documentation/arkit/occluding_virtual_content_with_people

https://developer.apple.com/documentation/arkit/capturing_body_motion_in_3d

https://developer.apple.com/documentation/arkit/creating_a_collaborative_session

https://developer.apple.com/documentation/arkit/creating_screen_annotations_for_objects_in_an_ar_experience


"Is the recommended approach to use both RealityKit and SceneKit together to get this to work"

Generally, no you would not use RealityKit and SceneKit together.


Another thing to be aware of, if you are intending to use RealityKit with SwiftUI, you will need to become familiar with UIViewRepresentable. There is a SwiftUI tutorial which explains how to use view representables available here:


https://developer.apple.com/tutorials/swiftui/interfacing-with-uikit