Hi everyone,
I’m working with RealityKit on visionOS and I’m seeing unexpected behavior when the user long-presses the Digital Crown, which recenters the world.
Observed behavior:
When the world is recentered via long-pressing the Crown, the models remain visually in the correct place (as expected).
However, if I query the model’s position or transform immediately after recentering (e.g. entity.position or similar), I still get the old values from before recenter.
As soon as I interact with the model using a gesture (drag/rotate/scale), the position updates and then querying it returns the correct, updated values.
So effectively:
Recenter happens
Visual position is correct
Programmatic position remains stale
First gesture causes the position to “snap” to the correct updated value
Questions:
Is there any event, notification, or callback that fires when the world is recentered due to a long press of the Crown button?
Is there a recommended way to get the updated world-space transform immediately after recenter, without waiting for a gesture?
Is this expected behavior due to deferred/lazy transform updates in RealityKit?
Right now it feels like recentering updates the coordinate system but doesn’t immediately commit new transform values to entities until some interaction occurs.
Any guidance or best-practice patterns for handling this would be appreciated.
Thanks!