Hello, i have question. How i can get distance(Vector3, cm, meter) between real object and camera? Which of the API may provide such an opportunity?
I want to create application which scan QR code and put 3d object on the QR code.
I did:
1. Add library Zxing and recognize QR code from frame.
2. When successfully recognized I add new 3d object on the QR code.
But, my script does not know how far the QR code is.I inserted an object one meter away from the camera. But if I move to another point, then the object begins to fly into space. Have I done the right thing? Is there any other way to insert an object?
```
carObject.transform.position = Camera.main.transform.position + (Camera.main.transform.forward * 1f);
```