Difference between Head and Device tracking on visionOS

In ARKit for visionOS, I can track the user's head with a HeadAnchor, but it will not give the location. However, I can get the device's transform by calling queryDeviceAnchor(atTimestamp: CACurrentMediaTime()) on a WorldTrackingProvider.

Why the difference? - if I know the device's transform, I effectively know the head's transform.

Answered by radicalappdev in 829271022

Apple has a neat sample project that shows have an entity follow based on head movements. It touches on the detail between the AnchorEntity and the DeviceAnchor.

https://developer.apple.com/documentation/visionos/placing-entities-using-head-and-device-transform

Hopefully, visionOS 3 will bring SpatialTrackingSession data to the head AnchorEntity position, just like we have with hand anchors now. (Feedback: FB16870381)

The position of a RealityKit AnchorEntity(_ target: AnchoringComponent.Target.head) is going to be very close to that of a ARKit DeviceAnchor queried for CACurrentMediaTime(), but likely not identical.

Accepted Answer

Apple has a neat sample project that shows have an entity follow based on head movements. It touches on the detail between the AnchorEntity and the DeviceAnchor.

https://developer.apple.com/documentation/visionos/placing-entities-using-head-and-device-transform

Hopefully, visionOS 3 will bring SpatialTrackingSession data to the head AnchorEntity position, just like we have with hand anchors now. (Feedback: FB16870381)

Difference between Head and Device tracking on visionOS
 
 
Q