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"

How to compare two rotations?

I need to return a float value that tells me just how much alike two rotations are. In other words: How accurate they are to each other.

For example: If both rotations are exactly the same, then the max float value will be returned. If both rotations are the exact opposite of one another, then the min float value will be returned. If rotator A is just a little different from rotator B, then the float value will return just a little below the max value. Etc.

Thanks in advance. ^^

Product Version: UE 4.15
more ▼

asked Jun 23 '17 at 12:47 AM in Blueprint Scripting

avatar image

184 15 21 30

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

1 answer: sort voted first

if my math is right this code should return something from 0 to 1 where 0 is opposite rotation and 1 is exactly the same rotation, you need low result for equal and high result for different, just do 1-result of the division, it will do what you want, hope it helps. Try this:


math.png (102.6 kB)
more ▼

answered Jun 23 '17 at 02:37 AM

avatar image

1.1k 31 18 66

avatar image JerichoBLT Jun 24 '17 at 07:35 PM

Yes! That's perfect! Thank you so much!

avatar image Warner V Mar 18 '19 at 01:53 PM

Sorry... perhaps a stupid question, but is this input to the numerator here a 'dot product'? When I'm trying this it says 'dot' but I'm not sure what else it should be..

(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