# How can I make a quest objective marker UI that rotates on the screen?

**URL:** <https://forums.unrealengine.com/t/how-can-i-make-a-quest-objective-marker-ui-that-rotates-on-the-screen/682444>\
**Category:** UI\
**Tags:** unreal-engine, UE5-0, Widget, Blueprint, question\
**Created:** [November 2, 2022, 12:35pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-quest-objective-marker-ui-that-rotates-on-the-screen/682444 "2022-11-02T12:35:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MorningstarMagic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/morningstarmagic/32/920558_2.png) [@MorningstarMagic](https://forums.unrealengine.com/u/MorningstarMagic)\
**Post date:** [November 2, 2022, 12:35pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-quest-objective-marker-ui-that-rotates-on-the-screen/682444/1 "2022-11-02T12:35:18Z")

</div>

Hey everyone, wanted to get some insight here about how to make the tracker mentioned in the title. What I have so far is that the tracker **knows** if it’s tracked objective is on screen or not. If the objective is on screen, the UI widget will just become a regular marker icon and it will sit on the location of that objective, otherwise it is just an arrow that I want to use to point to objectives which are off screen.

The part that I haven’t found much information is on how to make the widget **rotate around the screen** , pointing in different directions **along the edges of the viewport** to the objective depending on where the Player is. It is important to note that my game is top-down.

---

<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:** [November 2, 2022, 1:25pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-quest-objective-marker-ui-that-rotates-on-the-screen/682444/2 "2022-11-02T13:25:19Z")

</div>

Like this?

> [@UMG Widget: Stay on screen - But how?](https://forums.unrealengine.com/t/umg-widget-stay-on-screen-but-how/123044/5):
>
> while there’s half a dozen ways to implement this, the gist is to subtract half the widget size from the viewport size and use it as a clamp: vid: [https://i.gyazo.com/7e60baa21a0fbe5e5796d81524b27671.mp4](https://i.gyazo.com/7e60baa21a0fbe5e5796d81524b27671.mp4)

---

<div class="post-metadata">

**Author:** ![MorningstarMagic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/morningstarmagic/32/920558_2.png) [@MorningstarMagic](https://forums.unrealengine.com/u/MorningstarMagic)\
**Post date:** [November 2, 2022, 1:31pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-quest-objective-marker-ui-that-rotates-on-the-screen/682444/3 "2022-11-02T13:31:57Z")

</div>

Yea something like this just with rotation if possible. Given that I want to use an arrow or something similar, the tip of it should point to the edge always. If this isn’t possible then yea I’d probably try something like this and improvise a bit.

---

<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:** [November 2, 2022, 1:34pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-quest-objective-marker-ui-that-rotates-on-the-screen/682444/4 "2022-11-02T13:34:18Z")

</div>

Another, slightly different example:

> [@Make a HUD Icon Point at a target](https://forums.unrealengine.com/t/make-a-hud-icon-point-at-a-target/239678/3):
>
> Is this for a pure 2d widget? Also, the ‘bikes’ look awesome! If your arrow points up by default, the +90 should be -90 instead, most likely. fingers crossed Nicked it from here: [https://answers.unrealengine.com/questions/1008381/get-angle-between-actors.html](https://answers.unrealengine.com/questions/1008381/get-angle-between-actors.html)

Perhaps you can then combine both.

* * *

And if that’s not enough - the `keywords` you’re looking for are: `screen edge indicator`

---

<div class="post-metadata">

**Author:** ![MorningstarMagic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/morningstarmagic/32/920558_2.png) [@MorningstarMagic](https://forums.unrealengine.com/u/MorningstarMagic)\
**Post date:** [November 2, 2022, 1:44pm UTC](https://forums.unrealengine.com/t/how-can-i-make-a-quest-objective-marker-ui-that-rotates-on-the-screen/682444/5 "2022-11-02T13:44:55Z")

</div>

Combination of these two would be exactly what I hoped for! Thanks again for helping me, I was googling ‘objective marker’ , ‘quest marker’ ecc… and found not really clear tutorials. I’ll give this a shot now, thanks again! ❤

---

<div class="post-metadata">

**Author:** ![MorningstarMagic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/morningstarmagic/32/920558_2.png) [@MorningstarMagic](https://forums.unrealengine.com/u/MorningstarMagic)\
**Post date:** [November 3, 2022, 12:47am UTC](https://forums.unrealengine.com/t/how-can-i-make-a-quest-objective-marker-ui-that-rotates-on-the-screen/682444/6 "2022-11-03T00:47:00Z")

</div>

So if anyone encounters this problem, here is the quick rundown on how to do it. @Everynone has provided the two links above, just use the code from the blueprints he provided, you can literally copy everything. **Make sure you set up who is tracking and what is getting tracked** , don’t just leave it as is in the blueprint, depends on what you personally want here.

It’s very quick to set up and easily solves the huge problem I had because I didn’t know what to look for. Note that you will need to change the **+/- 90** in one of the BPs depending on if your marker image in the UMG is facing up or down.

Here is code that I found regarding if you want to check if an actor is on screen (in the viewport):

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

This isn’t the best solution, if you want the true true way you will have to do more than this (do some kind of box around your entire actor and then check each box point). For me this one works.

Another tip: try to **lessen the load on the Tick function** as much as you can. What I did was only use tick if I need to track something off screen. For actors on screen, I just set up a different image for the tracker and just left it as is.

Note also that a lot of posts I saw for this were for FPS and TPS. I am here to say that it works perfectly for top down as well! Again cheers to @Everynone for helping! 😃
