How to get level dimensions translated onto a texture dimension

Hi all,

I’m trying to do a texture based mini map and can’t figure out a few things,

  1. How to translate level dimensions to my minimap texture
  2. How to translate player location to my minimap.

Any help will be much appreciated :slight_smile:

A common way would be to use a custom renderTarget and just render your current level onto the map.

Of course you could also use a texture but then you’ll need to define your own standard about how many units should be one pixel (If you have a pretty large map you really don’t want it to take up the whole screen).

I suggest you look at this little tutorial. You can obviously also place a static texture instead of the renderTarget if you still feel you have to. :slight_smile:

Hi Fronzelneekburm,

Thanks for your reply. I have now a rendertarget minimap but was looking more to have a 2d minimap.