Home > Net >  How to use binary search on an animation curve to find time given value?
How to use binary search on an animation curve to find time given value?

Time:03-29

I'm using Unity's animation curves which unfortunately only have an Evaluate function that given time gives the value. I want to create a method that does the opposite of that. value gives time. I looked at this post: steep curve

It may fail on a steep curve, you should change the condition to

speed >= c.Evaluate(mid - elipson) && speed <= c.Evaluate(mid   elipson)
  • Related