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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

World Object Location to Mini Map Location

Hey everyone!

So this one has been bugging me for a few weeks now and I still can't find the solution...

  • I have a simple map that has instances of a Blueprint (let's call it 'Location_BP') placed in the world space which are basically used to reference a world space location.

  • I then have a Mini Map which has been setup with a Scene Capture 2D class, so it captures the actual world space scene every tick and displays that through a UMG Widget. It also follows the Character around the map, so I am not displaying the whole map all at once in the Mini Map, only the amount allowed by the size of the Mini Map Widget and the height of the camera.

  • I would like to display an icon on the Mini Map over the location of each 'Location_BP'.

I am having a huge amount of trouble trying to figure out how to get the real world location of the 'Location_BP', convert that to a 2D screen space location, and then adjust that location so that it sits over the 'Location_BP' displayed on the Mini Map.

  • Because the Mini Map Cam is capturing the world space scene, it would make sense to place the icon above the 'Location_BP' directly, but then how would I only display the icon on the Mini Map, and not in the world space?

  • Or is there a way to place another 'layer' over the map that can only be 'seen' by the Mini Map Cam, and would contain the icons?

  • Or is there a way to get the world space locations and divide them by the scale of the Mini Map, and then clamp them in the Mini Map?

I have tried all sorts of things and haven't been able to figure this one out, so any advice/help would be greatly appreciated.

Cheers, Logos

Product Version: Not Selected
more ▼

asked Mar 12 '15 at 12:15 PM in Blueprint Scripting

avatar image

11 1 1 4

avatar image CelestialCel Apr 20 '15 at 08:24 PM

Up, also quite need this :)

avatar image DesertEagle_PWN Sep 19 '15 at 03:29 AM

A response to this would be nice. I'm on the prowl for methods of doing this exact thing.

avatar image BrUnO XaVIeR Sep 19 '15 at 03:45 AM

You could go either way. You could clamp position as 0.0 : 1.0 values for both X and Z Map scale and compare actor position against a point of reference in world than convert it to map clamped location. Or you could make a rendering component for the MiniMap actor and parent sprits to it, checking "Only Owner Can See" property, this would equire much less math involved. You'd have to just set sprite location = target actor location every frame. If I'd have to make a minimap, I wouldn't render a top down camera, I'd go with a pre made texture and clamp locations relative to world's center (0,0,0) instead. Much less resources intensive.

avatar image DesertEagle_PWN Sep 19 '15 at 07:23 AM

Any chance you could elaborate on this? What do you mean X and Z map scale and clamped map location?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

My spontaneous instinct would be to go with the third option and read out the locations on the map, convert it and add an icon on the minimap.

You could add a capsule to your character which has a radius as large as the area the camera captures. Then you get all your overlapping Location_BP's, get their vector from your character to that location, throw away the Z axis and apply that vector in the correct scale to your minimap.

Alternatively you could also just apply world coordinates to your minimap (so it's aware which area it captures) and directly provide the coordinates to it.

There are some optimizations to not use a lot of resources since you're doing this each tick.

For example you should just keep an array of "Location_BP" actors and update them as you get the begin and end overlap events. Also not every marker moves probably meaning you can provide this as well meaning the none moving once don't have to be updated but only moved exactly like the minimap.

more ▼

answered Sep 19 '15 at 03:13 PM

avatar image

5.9k 291 86 293

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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