Simple minimap using a texture?

Hi folks,
alt text

215609-minimap-003.jpg

I’m trying to make a simple minimap that changes postion of a marker on a texture map when I press a key. I’d like to bind the movement to one of four keys - up, down, left and right and I need it to go off of one side of the map and wrap around. See below.

I don’t want to do a realtime top down render of the scene and my character isn’t actually moving physically around the scene. I had started to use Blueprint to shift my marker using the uv’s of the texture map of the marker on key press but I couldn’t get it to add the position of the U + V together.

Any ideas on how I sould take this would be appreciated.

Cheers,

P

Re asking as I seem to have added a big map on top of my question. :slight_smile:

Hi folks,

I’m trying to make a simple minimap that changes postion of a marker on a texture map when I press a key. I’d like to bind the movement to one of four keys - up, down, left and right and I need it to go off of one side of the map and wrap around. See below.

I don’t want to do a realtime top down render of the scene and my character isn’t actually moving physically around the scene. I had started to use Blueprint to shift my marker using the uv’s of the texture map of the marker on key press but I couldn’t get it to add the position of the U + V together.

Any ideas on how I should take this would be appreciated.

Cheers,

P

This is a different approach that purely looks at UMG and the active camera transform.

  1. Setup your scene and define the top-left and bottom-right extents of your map (as per your texture). You will input these coordinates in variables later.

  1. Have your map texture ready and create a location icon. I’ve attached examples:

266108-t-map-location.png

  1. Create a new Widget blueprint with the following layout. It’s important to check “Size to Content” on the Overlay. Make your Overlay a variable.

  1. Go into your Widget graph and apply the following. I’ve put it on EventTick but you can update the location on a custom event/dispatcher.

New Vector var: ‘TopLeftWorldCoordinate’ x -600, y -600, z 0.

New Vector var: ‘BottomRightWorldCoordinate’ x -200, y -200, z 0.

Note the location image size should be 32x32 for the offset of 16.

1 Like

No one ever like your post, despite the insane explanation.

Thanks bro.