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?
asked Jul 27 '18 at 11:42 AM in Blueprint Scripting
Do you have shortest path ticked?
answered Jul 27 '18 at 12:02 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here