Measuring a distance of AR point and camera in Unity

nasti_crop report abuse

I am developing an AR game in Unity using ARToolKit plugin. But now I am stuck with one problem. Can you suggest how can I measure a distance between AR marker and a point of a camera? It would be great if you can help me to find the approximate distance between these two points. Thanks.


Seb-at-Imaginghub report abuse

Hello @nasti_crop

have you tried the following line of code? dist=Vector3.Distance(ARMarker.position,transform.position);

If AR marker has Transform Component attached, you can measure distance.

Best regards.

Add Answer

Need support?

Just drop us an email to ... Show more