simple question

how did Animation Curve Evaluate the curve?

sorry more detail;

it uses a float input. And evaluates the curve. :] what more can I ask? I like what it did, How did it do it?

simple question

how did Animation Curve Evaluate the curve?

sorry more detail;

it uses a float input. And evaluates the curve. :] what more can I ask? I like what it did, How did it do it?

This is the C# source:

But it looks like the Evaluate() takes place in the native engine, alas:

```
// Evaluate the curve at /time/.
[ThreadSafe]
extern public float Evaluate(float time);
```

Probably could find some open source equivalent, or roll your own with bezier curves.

1 Like

So I gave it a distance kurt on 256 texture grid, and somehow it knows how to place it on the curve with no reference to a 256 value.

But thanks to that c script you posted I see it’s because the max value of the curve is infinity ! pretty cool.

Correction i am wrong

There is a value. It is refencing a value it was by chance that the scale returns function

The default value is 0 to 1 so my distance was within range.

A long time ago I essentially reverse engineered how the AnimationCurve worked at that time. However Unity added key weights which allow more flexibility and makes the evaluation a bit more complicated. But the overall logic remains the same. Depending on what you want to do, you may want to watch this video on bezier curves by Freya Holmer which is an excelent primer on bezier curves.

1 Like

I am a wishing man