I want to calculate the distance between any marker image saved in the iOS project which is used for detecting in Augmented Reality and your current position i.e. camera position using ARKIT ?
As Apple’s documentation and sample code note:
ARImageAnchor
object.ARImageAnchor
is a subclass of ARAnchor
.ARAnchor
has a transform
property, which indicates its position and orientation in 3D space.ARCamera
on every frame (or you can get it from the session’s currentFrame
).ARCamera
also has a transform
property, indicating the camera’s position and orientation in 3D space.That should be enough for you to connect the dots...