Ease to rotation

I had actually had this in SB3, for how the ship turns and all, but I actually just learned how nobody, and NOBODY, used its logic.

Basically, heres how it works, and Ill see if I cant replicate it for reuse in other games.

When using ease on rotation normally:
Say the current rotation is 0, and its being eased into 270. Its going to turn clockwise until its 270, when all it really has to do is turn 90 degrees counterclockwise. And the same applies going back

When using the rig in SB3:
Its been quite a while when I made this rig, so I dont quite remember how it works. However it fixes this-

Say the ship is at 0, and you want to go to 270, since the difference between the two is GREATER than 180, instead of turning clockwise, it actually adds 360 to 0, so it goes from 360 to 270, which causes it to turn counterclockwise 90 degrees instead. And this applies to all directions, 0, 45, 315, you name it.

@Wizardry because you might actually know what Im talking about

@“Mhx Ar” you seem to be into Metroid recently and Metroid has 8 way… or atleast M3 does.

@grazer because maybe this could be put into examples if I actually make one

I’m only using 8 directions, so it sets a direction based on buttons pressed set to a toggle stick.

@“Mhx Ar” I know, but it allows a smooth transition