- Home /
How do I get the value of a certain point in a curve?
I'm making something accelerate according to a curve. I need to be able to access the value of the curve at any given time. I don't know if i'm using the right words but by time i mean the x axis and by value i mean the y axis. So what i mean is to be able to get the height of the curve at any given time.
Comment
Best Answer
Answer by seth_slax · Sep 26, 2015 at 11:52 PM
I'm guessing you're using an AnimationCurve. If that's the case, the syntax is:
var theCurve : AnimationCurve;
var theTime : float;
var theValue : float = theCurve.Evaluate(theTime);