Minimap Icons at fixed locations

Hi, I’m trying to figure out how to have icons stay in one location on my minimap as it moves. Okay, that sounds confusing, but I’ll clarify.

In games with minimaps, there are often markers on the map like icons, at the locations of special places or items or whatever. The minimap keeps the player at the center, so as they move closer to the location, the icon “moves”. Do you guys sort of get what I’m saying? It’s in all sorts of games like Grand Theft Auto, and I think they have that in Assassin’s Creed, but I have never played it before so I don’t know for sure. Is there a way to do this in Unreal?

I have the player spawning in, and there is an object next to the player. I want an icon to mark that object’s location on the minimap wherever the player goes. Is that possible? And if so, how? I’ve been struggling with this for days, and I can’t get this problem out of my head.

How is your minimap implemented?

Either on Tick or whenever the Player or the Items position is changed, simply update the position of the icon to reflect that change.

This entirely depends on your minimap setup.You’ll likely need to get your player’s offset from the center of the minimap, and apply the negated version of that offset to the icon, I wish i could be more detailed, but I am going to sleep now.

Im assuming you are wanting to pin the icon to the edge of the map/compass so that you know what direction to head in to reach it?

I have a ScreenCapture2D thing as the minimap at this point. I used the tutorial on the unreal website just to start out.

Yes, only if the character is not within a certain range of the item. If the item is right next to the character for example, then the icon would be in the minimap, not on the edge.

There is no easy way too achieve this if you want it to be fully dynamic. The way the tutorial in the wiki is doing this is not really meant to be used with such icons. For my minimap, I use a different approach (having a “static” texture) so I can always convert the render target location to world location.

How do you do the conversions?

I use a lot of math to convert the locations. It took me a few weeks to get the math right, but as I said it would not work with the approach of the minimap explained in the wiki tutorial since they just use a moving SceneCapture (mine does not move, and you don’t even need to use one). :slight_smile: