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"

Lerping Rotators- object spins backwards if the rotation would take it to 360 or higher on a given axis

Hi there. I have an object which the player can rotate in increments of 90 degrees. In terms of the animation for that, the way I am achieving this is with a lerp (rotator). The starting position is of course a rotator variable which describes the last position, and the destination is calculated by combining that rotator with a second 0,90,0 rotator. This works fine for the first three rotations, however when the fourth rotation occurs and the object should rotate round to 360, it instead spins backwards 270 degrees. It ends up in the correct position of course, but goes back the wrong way. How might I phrase that calculation so that it rotates in the same direction?

Product Version: UE 4.20
more ▼

asked Jul 27 '18 at 11:42 AM in Blueprint Scripting

avatar image

33 4 2 5

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

1 answer: sort voted first

Do you have shortest path ticked?

more ▼

answered Jul 27 '18 at 12:02 PM

avatar image

13.7k 74 25 57

avatar image Cadellinman Jul 27 '18 at 12:06 PM

... I am such an idiot, thank you so much!

avatar image Everynone Jul 27 '18 at 12:07 PM

We've all been there and done that. Good luck with the rest!

(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