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. 

get the actor with the shortest rotation path

Hi. I'm trying to create a function that gives the character to multiple Locations / Actors and tell it which of them is the shortest rotation on the Z axis.

But I just can not get it, someone can help me?

Product Version: UE 4.18
Tags:
more ▼

asked Feb 23 '18 at 04:14 AM in Blueprint Scripting

avatar image

Pypatron
6 4 8

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

1 answer: sort voted first

...if I understand your objective properly, here's something like how I'd approach it:

a. Get Actor Rotation of character/pawn (rotation)... b. Get Actor Location of character/pawn (vector)... c. Get Actor Location of other multiple actors (vector).... d. Find Look At Rotation between char and other actors (rotation).... e. Break out the Z float value of a) and d) and deduct one from the other ... f. Store the result in an array... g. Use Min Of Float Array to identify the shortest rotation...

more ▼

answered Feb 23 '18 at 11:41 AM

avatar image

aNorthStar
1k 8 17 20

avatar image Pypatron Feb 24 '18 at 08:10 AM

Works perfect, thank you very much.

(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