im looking for a way to show the distance to an object above its POI. I already found a calculation function :
var distance = myLoc.distanceTo(geoLoc);
but im not sure how to implement it, so it gets updated automatically. Does anyone have an idea how this can be done?
W
Wolfgang Damm
said
over 10 years ago
you can use the onLocationChanged trigger of AR.context. This method is called each time the location changes and therefore gives you the opportunity to update your distance texts.
Alexander Ohlei