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.
Let me know if you need anything else.
A
Alexander Ohlei
said
almost 11 years ago
Hi everybody,
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?
Alexander Ohlei