Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.04k stars 1.14k forks source link

Unity camera position and orientation with respect to real world qr code #990

Closed pussup7181 closed 2 years ago

pussup7181 commented 2 years ago

Hi, I m developing an indoor navigation app using arfoundation. I m using zxing to scan the qr to localise in the map. But the only problem i m facing is determing the accurate distance and angle from the qr. Currently the distance and angle is fixed which lacks the location accuracy. Kindly help.

andyb-unity commented 2 years ago

You could try localizing the images using AR Foundation image tracking: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.0/manual/tracked-image-manager.html

pussup7181 commented 2 years ago

You could try localizing the images using AR Foundation image tracking: https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.0/manual/tracked-image-manager.html

can you help me with the code?

jackviatick commented 2 years ago

I got the same issue too, how can we detect the camera is facing the image. Can we get the angle between the camera and the image

andyb-unity commented 2 years ago

I recommend taking a look at the Basic Image Tracking sample scene: https://github.com/Unity-Technologies/arfoundation-samples#basicimagetracking

You have the Transform of the tracked image and the Transform of your Camera, and you can perform any calculations or manipulations from there

ankur-unity commented 2 years ago

Closing due to inactivity.