# UI player marker on a moveable map

**URL:** <https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [February 8, 2024, 4:41pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509 "2024-02-08T16:41:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Itsfate399](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Itsfate399](https://forums.unrealengine.com/u/Itsfate399)\
**Post date:** [February 8, 2024, 4:41pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/1 "2024-02-08T16:41:50Z")

</div>

Hello!

so i got a UI map that can be zoomed in and moved from someone called (Everynone) someone on these forms, but i am trying to make a player marker on the map which shows the location on the UI map relative to the world location but i have no idea how.  
if anyone has any idea how to do it will be very helpful.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 8, 2024, 5:17pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/2 "2024-02-08T17:17:34Z")

</div>

When a widget is in the centre of [that map](https://forums.unrealengine.com/t/how-to-scale-zoom-a-widget-with-blueprints/430983/25), it’s at 0,0 coords:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/1/3b1be6f3d4a75d36ac5db68c44fb66274ceb3e45.jpeg)

The **P** oint **o** f **I** nterest\_3 will represent my player. The image size used is:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/0/d/b0d06e332c745b943cc38b4bb30adb41b0b221c1.png)

We need to translate player world coordinates into a canvas coordinate:

- orange - player world location

mapped onto

- green - map image size

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/6/0e6277fbac3ac350c4feb741e6639227c5abe481.png)

* * *

disclaimer: there’s a chance I mixed up X & Y above. Flip them around if the numbers do not add up. 😇

---

<div class="post-metadata">

**Author:** ![Itsfate399](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Itsfate399](https://forums.unrealengine.com/u/Itsfate399)\
**Post date:** [February 8, 2024, 6:48pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/3 "2024-02-08T18:48:18Z")

</div>

could i ask why did you put -50000 and 50000 for the player world location, because for me the player marker really just vanishes i dont even know where it is. i have put for the map image size for both y and x -3000, 3000 because my image size is 6000x6000 i believe thats what you did but it is not working for me.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 8, 2024, 6:58pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/4 "2024-02-08T18:58:56Z")

</div>

> [@Itsfate399](#):
>
> could i ask why did you put -50000 and 50000 for the player world location

I don’t know how big your play area is. This is just an example.

- 100uus = 1 meter
- -50000 \<=\> 50000 assumes your world is 1sq km and you stand in the middle at 0,0

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/6/3862b68b035851f824b18dff09a95ffecf2ded33.jpeg)

> the map image size for both y and x -3000, 3000 because my image size is 6000x6000

Sounds fine. If you’re not sure what happens to the player’s icon, observe the values nodes produce.

---

<div class="post-metadata">

**Author:** ![Itsfate399](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Itsfate399](https://forums.unrealengine.com/u/Itsfate399)\
**Post date:** [February 8, 2024, 7:29pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/5 "2024-02-08T19:29:09Z")

</div>

ok so i added more zeros to the 5000 and -5000 till the player marker showed and it does work when i move my character the marker moves, but now the issue is that the player marker location always starts from the center of the map 0,0 and not the actual location of the player because the player’s location or spawn is not at 0,0. so it doesn’t actually represent the player’s location unless the player always spawns on 0,0

---

<div class="post-metadata">

**Author:** ![Itsfate399](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Itsfate399](https://forums.unrealengine.com/u/Itsfate399)\
**Post date:** [February 8, 2024, 7:32pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/6 "2024-02-08T19:32:46Z")

</div>

another note: the map isnt always open like the video, as there is no mini map

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 8, 2024, 8:11pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/7 "2024-02-08T20:11:22Z")

</div>

This should not be the case providing it’s being updated correctly. It’s on Tick, it updates every frame. The map is a widget, feel free to show or hide it as you please. Not really sure what you mean.

---

<div class="post-metadata">

**Author:** ![Itsfate399](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Itsfate399](https://forums.unrealengine.com/u/Itsfate399)\
**Post date:** [February 8, 2024, 8:34pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/8 "2024-02-08T20:34:41Z")

</div>

so the player marker is set to 0,0 the center of the map UI, so when i play the position of the player marker isnt set to the position of the actual player, it does move with the player but it isnt giving the right position or location

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 8, 2024, 8:45pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/9 "2024-02-08T20:45:23Z")

</div>

Could you show the script? And the anchor setting of the widget?

---

<div class="post-metadata">

**Author:** ![Itsfate399](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Itsfate399](https://forums.unrealengine.com/u/Itsfate399)\
**Post date:** [February 8, 2024, 8:54pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/10 "2024-02-08T20:54:24Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/6/016b7a834f3507a36ab5b61abe5fad28b28c6023.png)  
so this is the script which is happening inside the widget.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/4/a64e58de8520da249bb82af823a060a12d928172.jpeg)  
these are the anchor settings.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/1/1f1d360149b40217f58575dfe5dbb41f33944da5.jpeg)  
and here is the player marker and where it starts on the map which is 0,0 of the widget, and the blue is where the player spawns on the current save. so when i start the player marker doesnt go to where the player is currently located, but stays at the center of the map and moves from there.

and sorry if iam taking any time \<3

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 9, 2024, 7:16am UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/11 "2024-02-09T07:16:30Z")

</div>

Hiya, I am unable to replicate any of the behaviours you mention. I’ve set up a couple of automated and manual tests with:

- moving elements
- static ones
- elements that spawn dynamically
- elements in far corners of the map
- showing and hiding it

For example, a pawn at:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/b/f/9bf47116ba9bab1669f0c71e33e6126c2bdd6cfd.png)

Shows up here:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/5/b/25bb3c354c24004a042893935639195443eea45f.jpeg)

And moves accordingly. One note, widgets that are hidden and / or not in the viewport do not Tick. Not sure if relevant here, though. But I’d recommend against widgets pulling data.

* * *

My suggestion is to look at the actual numbers your setup is producing.

---

<div class="post-metadata">

**Author:** ![Itsfate399](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Itsfate399](https://forums.unrealengine.com/u/Itsfate399)\
**Post date:** [February 9, 2024, 11:31am UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/12 "2024-02-09T11:31:36Z")

</div>

I will be doing further testing and will get back to you if i achieve anything.

Thank you!

---

<div class="post-metadata">

**Author:** ![DragonVsKira](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DragonVsKira](https://forums.unrealengine.com/u/DragonVsKira)\
**Post date:** [April 25, 2025, 10:01am UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/13 "2025-04-25T10:01:45Z")

</div>

@Everynone  
how can i make the map follow/move with the UI player marker ps ty

---

<div class="post-metadata">

**Author:** ![RedGrimnir](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/redgrimnir/32/1054683_2.png) [@RedGrimnir](https://forums.unrealengine.com/u/RedGrimnir)\
**Post date:** [April 25, 2025, 1:06pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/14 "2025-04-25T13:06:54Z")

</div>

You need get pin location relative to viewportsize /2 (middle).  
and transform canvas to there

which will center pin on screen. That you need to do transforms on tick so it follows

---

<div class="post-metadata">

**Author:** ![DragonVsKira](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DragonVsKira](https://forums.unrealengine.com/u/DragonVsKira)\
**Post date:** [April 25, 2025, 10:38pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/15 "2025-04-25T22:38:48Z")

</div>

sorry noob here at widget u have a pic ps ty alot

---

<div class="post-metadata">

**Author:** ![RedGrimnir](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/redgrimnir/32/1054683_2.png) [@RedGrimnir](https://forums.unrealengine.com/u/RedGrimnir)\
**Post date:** [April 26, 2025, 11:51am UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/16 "2025-04-26T11:51:50Z")

</div>

Allright as an example how to do it ( I will demonstrate from my exxperimental map) but its similar logic basically in many umg architecture and structure.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/b/46b67a2bfc7551abd6b139b4b8219a1697bb98e3.png)

I have a structure in my map and on map tick I have a function as FollowPlayer

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/a/7baad99d8a5bb5315cfca5c4035a2c642b1656d1.png)

Inside follow player function, I check if player is moving (you can have any other logic depending on your target ux). Then I simply move MapBaseContainer to relative to pin by

(Getting screen center / 2 ) - PinPositionRelativeToViewport , that basically adds that much of delta position to MapBaseContainer and result is centered tracking pin position.

Result is below.

Not sure how your structure is however logic is same : Compansating you mapbase location to target pin location

---

<div class="post-metadata">

**Author:** ![DragonVsKira](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DragonVsKira](https://forums.unrealengine.com/u/DragonVsKira)\
**Post date:** [July 5, 2025, 5:37am UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/17 "2025-07-05T05:37:13Z")

</div>

all seem to work but is there a way to keep the player icon center of the map  
when i zoom to far out the player icon move out of the map when moveing ps tk u

---

<div class="post-metadata">

**Author:** ![RedGrimnir](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/redgrimnir/32/1054683_2.png) [@RedGrimnir](https://forums.unrealengine.com/u/RedGrimnir)\
**Post date:** [July 11, 2025, 9:55am UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/18 "2025-07-11T09:55:16Z")

</div>

Not sure but I feel maybe the icon is not the child of the map itself.

So if you keep icon (whatever widget) under the hierarcy of zoomed widget, they should move together fundamentally.

Also zooming should be done from the cursor placement, or you should assume that the zooming is always from the center anchor point of the viewport.

If issue persists, a video explanation can mean more to me/us to narrow down bug/problem space.

---

<div class="post-metadata">

**Author:** ![DragonVsKira](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DragonVsKira](https://forums.unrealengine.com/u/DragonVsKira)\
**Post date:** [July 13, 2025, 12:58am UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/19 "2025-07-13T00:58:27Z")

</div>

the bug is when i zoom out it go out of sync

i trun it into a Plugin just add the Map component to your player character ps thanks for helping

DL Link Here

ps sorry for the late reply back

---

<div class="post-metadata">

**Author:** ![DragonVsKira](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DragonVsKira](https://forums.unrealengine.com/u/DragonVsKira)\
**Post date:** [July 14, 2025, 9:10pm UTC](https://forums.unrealengine.com/t/ui-player-marker-on-a-moveable-map/1674509/20 "2025-07-14T21:10:57Z")

</div>

if anyone fix it plz let no

i can do a video if u need it but code is the same as the plugin

i just have download obs or something lol
