Hi, I called it "perspective problem", but I'm not quite sure what it is. I have a tag that I track with builtin camera. I calculate its pose, then use extrinsics and device anchor to calculate where to place entity with model.
When I place an entity that overlaps with physical object and start to look at it from different angles, the virtual object begins to move. Initially I thought that it's something wrong with calculations, or some image distortion closer to camera edges is affecting tag detection. To check, I calculated the position only once and displayed entity there, the physical tracked object is not moving. Now, when I move my head, so the object is more to the left, or right in my field of view, the virtual object becomes misaligned to the left, or right. It feels like a parallax effect, but distance from me to entity and to physical object are exactly the same. Is that expected, because of some passthrough correction magic? And if so, can I somehow correct it back, so the entity always overlaps with object? I'm currently on v26 beta 5.
I also don't quite understand the camera extrinsics, because it seems that I need to flip it around X by 180 degrees to make it work in deviceAnchor * extrinsics.inverse * tag
(shouldn't it be in same coordinates as all other RealityKit things?).
Hello @brother_z , thank you for your question!
If you are seeing a virtual object drift from its original position, that sounds like unexpected behavior and I would recommend submitting a bug report via Feedback Assistant. However there are many things that could be preventing your device from tracking its position correctly, such as obstructed cameras or high velocity motion (like wearing Apple Vision Pro on a train), so it's hard to diagnose without more details about what you're trying to do.
Access to the main camera requires an entitlement. The extrinsic value of the camera will be a 4x4 matrix representing its pose relative to the device. The math you've shared here looks correct, although I'm not sure what your tag
object is? Are the tag objects you are referring to Entities you've created?
If you do file a feedback request, I recommend sharing as much of your project in the request as you are able to, and then share the number here so we can track it on our end.
Thank you!