How to create a dynamic map


#1

Hello to everyone my greetings.
My question is how we can take the player’s position and make the pin correspond to that data in the map like gps?
Have in mind the map exist on a separate scene the “Map scene”.

I have the “World scene” that the player moves around also a car that he can take over and drive to the world like gta.
So I want to take account also the car’s position because when we control the car the player is deleted


#2

Hi,
Here’s a (wild) guess:
You divide your world map in, let’s say, 20 areas. Each local area is a separate scene that represents the world map at a 10x scale.
If your player wants to play in the top left corner area, you know that the local map coordinates start at 0;0.
You then store the player coordinates as global variables, dividing the coords by the local>world scale, and adding the world start coordinates.
So, if your player is at 400;200 on the local map, if your local map is a x10 scale of the world map, we get: 0 + (400/10) ; 0 + (200/10)
So, on the world map, your pin will be at 40;20.

But I guess it depends on how you load the local maps compared to the world map.


#3

Oh man i have headache already :smiley: thanks for your wild guess you gave me a good picture about how to approach it.