x

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. 

Arrows that point toward object in level with UMG/UI (Head in this direction)

Hi there. So I have a top down game and I'm trying to make some sort of system that will display arrows in your UI that will point in the direction your allies or your objective are in, so you can head in that direction.

I have no idea where to start with this however. I would like to either just have them rotate in the direction that the objective is in, your move around the peripheral of the window/screen to aim you in the direction you should head.

Any help is appreciated, thanks!

Product Version: UE 4.18
Tags:
more ▼

asked Dec 20 '17 at 06:30 PM in Blueprint Scripting

avatar image

Tifa
15 3 4 10

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

1 answer: sort voted first

Hey there, is the location of the arrow fixed in the UI and it just rotates in place?

more ▼

answered Dec 20 '17 at 08:17 PM

avatar image

xlar8or
6k 161 129 304

avatar image Tifa Dec 20 '17 at 08:26 PM

I'd like to have the arrow be able to move around the peripheral of the UI, but a fixed one could work as well, and I'd just work from there for achieving the result I want, just not sure where to start.

Thanks for the reply!

avatar image xlar8or Dec 20 '17 at 08:43 PM

Hey there, this will give you the angle between the direction the character is facing and the objective. If you plug this angle into the arrow's rotation in UMG (the arrow by default needs to be pointing up) it should work.

alt text

compass.png (162.4 kB)
avatar image ken09block123 Dec 20 '18 at 02:04 PM

This worked perfectly! thank you so much, you have no idea how helpfull that was!

avatar image xlar8or Dec 20 '18 at 02:13 PM

Good to know :)

(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