0 votes

Is it possible to animate blend amount between 2 number from code?

in Engine by (15 points)

Could you please be more specific? What do you mean by "animate blend amount"?

1 Answer

+1 vote
Best answer
lerp(1.0, 3.0, 0.5)
# returns 2.0

lerp(1.0, 3.0, delta)
# returns whatever 'delta' points at between the two inputs

_CurrentVariable = lerp(_CurrentVariable, _GoalVariable, delta)
# returns _CurrentVariable that always grows/shrinks closer to _GoalVariable


by (79 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.