Topic: Best practice geofencing
I'm wondering what the best practice for geofencing would be.
What I want is for when my user to walk a route with 3d markers scattered on it and entering an X radius (10-200m) of said markers that they "unlock" it.
I've seen some geofencing examples and examples with BoxCollider, but I'm wondering what the best practice is for this kind of behaviour? And if there is an example that I can look at to get an idea of what to do.
I used to do this in Mapbox by calculating the distance between geo location of player and closest marker object in the scene. I've tried doing the same in my current project with Online Maps, but it seems that I'm doing something wrong with the OnlineMapsUtils.DistanceBetweenPoints (I keep getting 0 as the distance between two points, I think it's because they get transferred into doubles and lose the rest of the decimals, which makes the lat/lng "identical").
Any help would be appreciated!
I'm using 3d markers and the LocationServices player marker if that's important to know.
p.s. so far I'm loving this plugin, a lot of useful features and examples that I can chop into custom things to use.
Edit:
I've found this: http://infinity-code.com/atlas/online-m … ample.html
Which I can rewrite to do what I want to achieve, but it this the best practice?