How to get the player position on an open world style map?

This is what I’m thinking, I’ve seen plenty of tutorials about simply zooming out and creating a render texture etc. for your minimap to display the player. How would it work though getting the player icon to accurately track the player position along a 2D image? The static icons seem like they’d be pretty straightforward to set up but I haven’t worked out the maths for the player.

I like to put invisible GameObjects in at the corners of the map, say, one in the upper left, one in the lower right.

Then you can use those as inputs to your world-to-minimap scaling method, just with Mathf.InverseLerp() followed by Mathf.Lerp(). That works regardless of static-ness or later runtime-ness.

I use it here in my post-mission ground track map:

1 Like

Another interesting method, I wonder if I could get away with just scaling this up, will experiment with both methods and see what happens, I’m not doing anything fancy regardless. I’m kind of running an experiment at the moment to see if I can make some kind of world the equivalent size of the old Fallout 3/New Vegas games and want to see how the engine runs. For that I’ll need a half-decent fast travel system and world map.