hi, am new to unity and AR.
so my program should calculate the distance between 2 game objects , and based on the distance it will activate and de-activate 3d model.
but when I use : distance2 = Vector3.Distance(Sphere2.transform.position,Sphere2a.transform.position);
its measuring the distance between the camera and the game object, not the distance between the two game objects !!!
attached is the script am trying to build
Looks like you haven’t set Sphere2 or Sphere2a correctly. Look at the inspector and see where you have accidentially put in the camera instead.