3D Space System Conversion Howto

I was trying to put an anchor at a person's left hand. I am stuck! Please help. Here is what I was able to do so far:
  1. Body Tracking and got body anchor. Works fine.

  2. Got left hand transform relative to body hip. Works fine.

  3. Compute hand transform relative to world - I have questions

At the step 3, since I am not familiar with 3D computation, I am looking for an API to do that. I finally found the following:

https://developer.apple.com/documentation/realitykit/entity/3244058-convert

Code Block swift
func convert(normal: SIMD3<Float>, from referenceEntity: Entity?) -> SIMD3<Float>

This API seems exactly fitting my requirements. However, to use it, it seems really strange: I will need to create two entities - I will need to create an empty entity in the World space and then create an entity to be anchored at the hip of the person (for from parameter).

Could someone help me on this?

Thank you!



Well, according "Body Tracking Example Using RealityKit, ARKit 4 and SwiftUI"  video on youtube by Ryan Kopinsky, the coordination system for body is same as world coordination system except origin changed. So the position calculation is simply vector addition.


3D Space System Conversion Howto
 
 
Q