Hi Unity lovers,
For my AR app, I have to place objets at specific coordinates, given in relative positions XYZ from a real world object. I know that, in ArKit 2.0 (and above), the AR World Origin can be changed with the function “setWorldOrigin(relativeTransform: simd_float4x4)”
So I would like my app to set the world origin that way :
-
Scan the ground a bit until ArKit find the ground plane (like all the others AR apps)
-
Pick 2 points (for exemple A et B) on the ground, near to my reference real world object.
-
Set the AR World Origin position to A, and the AR World Origin orientation to A-B vector (for the +x axis for exemple)
Someone could explain me how can I achieve that ?
Thanks a lot for any help !