Make widget arrow always point at item with BP UE5

I am trying to get an arrow that is pointing at an item to always have the tip of the arrow point toward the object.

For example, if I have an arrow point to the left of an object on it’s right side and then I rotate my position around the object, that arrow that was once pointing at the object is still pointing to the left but on the right side of the object because it direction will always be the same.

So it would be something like this:

Object{
{Object

But I want that arrow to always be pointing at the object despite how I walk around it like this:

Object{
}Object

I am still fairly new to BP and would appreciate the help. I tried to find some guides on YouTube and the closest I found was an arrow someone created that leads a character in the direction of a quest point by placing the rotating arrow above the character’s head.

Not an easy thing to answer, but take a look at this video. It might help you: Location Based Directional Arrow On Screen - Unreal Engine Tutorial - YouTube

2 Likes

Yeah, this is the video I was watching where I mentioned a YouTube video. It probably will be the closest I can get. I will have to sit down and take some time with the video and try to reconstruct it in mine.

Hey @Lady_Karo, could you show the current code for this widget? I can’t really tell you any specific solution without knowing the code.

I imagine that if the widget is in screen space, then you need to project the object to screen space as well, so that you can know where it stands relative to your widget. That’s pretty much all you need I think. If you know the relative location then you can rotate the widget accordingly.

Sure, this first one is from my widget. Currently it has an arrow pointing straight down and it will switch to E for pick up once within range.

This is within my master pick up item that will display the widget:

I don’t know if there is a way to export code… I have just been learning blue prints through some Udemy courses for about a week and a half. I feel like what I am trying to accomplish should be on the bottom image within the Event Tick. Ideally, I would just like the arrow to bound to a center part of the object so it always has a spot it will keep pointing at no matter which way you can turn. However, if it is a bad idea (I heard event ticks can become iffy after a while) we can always just use a down arrow within our own game. I hope that makes sense.