Problem by coding AR app

hello,

I'm fairly new to Xcode and I need help with my first project...

this is my first post on this forum I apologize in advance ...

this is my code and i don't now why i got an error 😕

   private func place(_ modelEntity: ModelEntity, in arView: ARView) {           let clonedEntity = modelEntity.clone(recursive: true)           clonedEntity.generateCollisionShapes(recursive: true)     arView.installGestures([.translation, .rotation], for: clonedEntity)           let anchorEntity = AnchorEntity(plane: .any)     anchorEntity.addChild(clonedEntity)           arView.scene.addAnchor(anchorEntity)           print("Added modelEntity to scene.")         } }

My Errors ->

Type 'AnchoringComponent.Target' has no member 'any' Extraneous argument label 'plane:' in call

and when i press "Fix" it do not fix the error

if you know what the problem is let me know 😉

Best regards

Hi there! No worries, next time, please tag your post with RealityKit since this is using the RealityKit APIs. That will make is easier for us to find your post.

What Xcode version are you using, and what OS are you trying to build your project for (iOS macOS)? I am able to compile your code successfully using my Xcode.

Problem by coding AR app
 
 
Q