ARObject does not update ARAnchor transforms
Closed this issue · 1 comments
Reality-Dev commented
From the Apple documentation on ARAnchorCopying
:
Because anchor objects are immutable, ARKit must copy them to make changes from one ARFrame to the next.
Therefore, the transform values here in Satin are never getting updated (they stay the same):
fileprivate class ARObject: Object {
…
override func update(camera: Camera, viewport: simd_float4) {
guard let anchor = anchor else { return }
self.worldMatrix = anchor.transform
super.update(camera: camera, viewport: viewport)
}
ARKit appears to require us to use the
ARSessionDelegate.session(_ session: ARSession, didUpdate anchors: [ARAnchor])
method to get updated transform values.