Does any one know how to create custom animation curves using easing functions ? Have no idea how to do it at the moment, currently manually making the curves with my mouse, but would rather use my easing functions.
Are you coming from an environment where you could use your own functions? If so, which one, and I’ll try to explain it from that perspective, as to how it works in Unity.
Beziercurves should help you with that? Sorry, just on phone right now
Sorry for the late reply so i have for example this function:
public class Quadratic
{
public static float InOut(float k)
{
if ((k *= 2f) < 1f) return 0.5f * k * k;
return -0.5f * ((k -= 1f) * (k - 2f) - 1f);
}
}
And i want to create an animation curve of this function. How would i do this?
Not sure if you are looking to use easing functions in your code, or if you want to create actual curve presets that you can select in the editor.
If it’s the latter, someone already create easing curve presets for Penner’s easing functions:
I want to create the actual curve in the animation curve editor with the functions / equations i have.
Something like this? https://github.com/nobutaka/EasingCurvePresets
@TheCelt Check out the link. There’s a curve generator script in there that you can use.
Has anyone an alternative link? Unfortunately the given link is not working anymore.
Perhaps this one Google found?
https://github.com/qwe321qwe321qwe321/Unity-EasingAnimationCurve
Looks promising! Many thanks!