Anchors in RealityKit

Hi

I have a scene which was created in Reality Composer. I wish to create an anchor programmatically that remains fixed in the scene. The following code works, but the anchor drifts around with the camera, in stead of being anchored in a fixed spot. Any ideas why this is?

Code Block
     let targetTransform = Transform( matrix: Targets.currentTarget.transformMatrix( relativeTo: nil ) )
    let dropAnchor = AnchorEntity()
    dropAnchor.transform = targetTransform
    dropAnchor.addChild( background )
    Prox.scene.addAnchor( dropAnchor)


I have been struggling for months now, nothing seems to work. Any ideas would be appreciated.

Replies

Hmm, maybe specify the degrees of the anchor..? lmk
OK, I have been using ARImkageTrackingConfiguration - that doesn't track anything except Image anchors. Unfortunately that provides me with a reason why this doesn't work, but unfortunately the ARWorldTrackingConfiguration does't work for my image requirements, as it does not update frequently enough. Hmmmm.