By adjorlu
on Wed, 06/20/2012 - 17:11
Dear Community
We are doing a project in unity for android.
In this project we need to check the distance from the AR camera to the gameobject/fiducial in order to make some of the objects invisible when you move the phone closer to the fiducial and some other object visible in stead. You can call it some sort of "level of detail".
So my question is how to calculate the distance between AR camera with fiducial/gameobject. So far im using something like this:
void Update() {
float dist = Vector3.Distance(AR.position, transform.position);
}
But it dont seem to help.
Hope some of you may be able to help us. we will appreciate it a lot.
Re: calculating AR Camera distance to gameobject/fiducial
Re: calculating AR Camera distance to gameobject/fiducial
Re: calculating AR Camera distance to gameobject/fiducial