How to calculate the distance from the camera to a node in ARKit.
Published in
1 min readNov 21, 2018
Use the line below, where YOUR_NODE — is your node.
let distance = simd_distance(YOUR_NODE.simdTransform.columns.3, (sceneView.session.currentFrame?.camera.transform.columns.3)!);
O