brnkhy / MapzenGo

Pokemon Go clone using Unity3D & Mapzen/OpenStreetMap
http://www.barankahyaoglu.com
MIT License
200 stars 59 forks source link

Stop re-centering world on tile update #23

Closed flarb closed 8 years ago

flarb commented 8 years ago

Maybe there's a better way to do this, but I can't place 3D objects on top of the map in world coordinates (say, a monster 4 units away from the player in world units) because the camera / player is reset back to 0,0,0, when he moves off the screen and the tiles are dynamically loaded.

I guess you could either not reset the camera/player position, or maybe we need a function that converts lat/lng to world coordinates based on the current player location--and then those game objects can have their world position updated based on their lat/lng whenever the camera resets?

brnkhy commented 8 years ago

well the easiest way to solve that is to make any world object, a child to the its tile but still yea, there should be an option to disable that. I mean it's there just so that people cannot walk into the float.max but majority of users probably won't need that anyway.

flarb commented 8 years ago

Ah I get it--well maybe you should make it a checkbox option in the inspector. I can see uses for both ways.

brnkhy commented 8 years ago

pushed this on dev branch, can you please let me know if you try it out?

brnkhy commented 8 years ago

pushed on master branch, it's optional now