x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Simple minimap using a texture?

Hi folks, alt textalt text 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

Product Version: UE 4.15
Tags:
minimap-001.jpg (162.7 kB)
minimap-003.jpg (163.3 kB)
more ▼

asked Oct 03 '17 at 02:37 PM in Blueprint Scripting

avatar image

Bushey
54 3 6 14

avatar image Bushey Oct 03 '17 at 02:39 PM

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

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

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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. Scene layout

  2. Have your map texture ready and create a location icon. I've attached examples: alt text alt text

  3. 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. alt text

  4. 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. alt text

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

more ▼

answered Jan 22 '19 at 12:12 AM

avatar image

Razivoid
56 5 5

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question