When to use an AnchorEntity or HandTrackingProvider in VisionOS

As I understand it there are two ways I can track a hand, or a joint, in RealityKit:

  • either, create an AnchorEntity, for example AnchorEntity(.hand(.left, location: .palm))
  • or, set up an ARSession with a HandTrackingProvider ( a lot more code which I haven't repeated here).

Assuming this is correct, when would I want to use one over the other?

If your goal is to anchor a RealityKit entity on a specific joint, RealityKit is the way to go. If you want to work with transforms across multiple joints directly, ARKit might be the better tool.

When to use an AnchorEntity or HandTrackingProvider in VisionOS
 
 
Q