Rotation Interpolation

I know this is 2 years old, but I’ve recently been looking around for the same problem and I don’t see an elegant solution without ifs posted in here, so here it goes:

    shortest_angle=((((end - start) % 360) + 540) % 360) - 180;
    return shortest_angle * amount;

that’s it

ps: of course, % is meaning modulo and shortest_angle is the variable that holds the whole interpolation angle

Leave a Comment