Variable reduction same for Pos / Neg?

I’ve created a Swing Function for rotating an actor which works fine but need to reduce the “Angle” to 0. I tried Angle - Time which fine if the angle is positive but will increase when negative. Any suggestions?

I can use an Ease Function which works fine but was wanting to try to create the function myself with a little bit of math.

Use Abs(Angle - Time) to get a value that increases going either direction away from 0.

I did, same result.

A bit convoluted but this works …

Also added some Damping. Trouble is this isn’t really an ease function.

Turns out that using Angle*0.99 each tick works much better.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.