Hey guys, quick question. I’m using the ColorCorrectionCurves effect on a camera for a game with a day-night cycle (to give things a blueish tint at night in moonlight), and I want to smoothly blend between different curves for the blue channel between night and day.
I need some kind of AnimationCurve.Lerp(curve1, curve2, time) function. I’ve scoured Google and the wiki and haven’t been able to find anything. Any advice?
Thanks!
Figured it out (a year ago!) Here’s the solution for anyone else looking to do the same thing… “UpdateParameters()” is what you’re after. Here’s a quick snippet of code from the project (again it was a lot time ago so I’m not exactly sure what I’m looking at, haha.)
colorCurves.blueChannel = new AnimationCurve(new Keyframe[]{new Keyframe(0f, 0f, 0f, Mathf.Lerp(2.5f, 1f, lerpValue)), new Keyframe(1f, 1f, Mathf.Lerp(0f, 1f, lerpValue), 0f)});
colorCurves.UpdateParameters();