20 public Vector3
value = Vector3.zero;
24 public void SetBlend(
float blend,
float deltaTime = 1f) {
25 delay = deltaTime * blend / (1f - blend);
28 public Vector3
Update(Vector3 input,
float deltaTime = 1f) {
29 if (deltaTime > 0f && !
reset) {
30 float alpha =
delay / deltaTime;
31 float blend = alpha / (1f + alpha);
36 value = Vector3.Lerp(this.value, input, 1f - blend);
Time-step independent exponential smoothing.
Vector3 Update(Vector3 input, float deltaTime=1f)
void SetBlend(float blend, float deltaTime=1f)