RealityKit Animation Completion Handle Issue

13 hours ago 2
ARTICLE AD BOX

I am using function below to make some animation in RealityKit application it is OK generally.

But there is a problem; the animation does not always finishes its job at given duration so it messes up things which start after animation completion.

Because there is no completion handler (I could not find) for this animation we are using

DispatchQueue.main.asyncAfter(deadline: .now() + duration + 0.1) { [self] in

// next animation

}

I am looking for deterministic completion handler for RealityKit animation.

let newTransform = Transform( scale: currentTransform.scale, rotation: newRotation, translation: currentTransform.translation) entity.move( to: newTransform, relativeTo: anchor, duration: duration, timingFunction: .easeInOut )
Read Entire Article