Topic: Detecting proximity to body of water

This asset looks great, and I'm on the verge of purchasing.
Before I purchase this asset though, I want to know:

1) Is it possible to detect how close you are to a body of water?

2) If yes, how is this information relayed? Is it by meters or feet away? Or is it only if you are right on top of the water?

I want to make something similar to PokemonGO where the game seems to know when you are within 100 yards of water, but I don't know if that is logic Niantic implemented by going over every body of water in the world and labeling it, or if a GPS asset like this one would make handling water proximity easier.

Thanks in advance!

Re: Detecting proximity to body of water

Hello.

This can be done in many ways, for example:
1. (If you need to know the distance to the water) You make a request to OSM Overpass API and get the water data, check that player is not in water, and calculate the distance from the player’s location to the nearest segment of water.
2. (If you need to know the distance to the water) You download vector tiles from OSM or Mapbox, load it and calculate the distance from the player’s location to the nearest segment of water.
3. (If you only need to check that in the location the water is present) Just check the texture color in the location.
Sometimes it is convenient to use stylized tiles from Mapbox or Google Maps to do this.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Detecting proximity to body of water

This sounds great! I'm going to show this to my team, I think this is exactly what we wanted to hear. Not only is it possible, but there are also multiple ways to go about. This looks like the logical decision to start with. I will let you know when we purchase it.

Thanks again.