Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ebicthings |
Im using lerps to try to make the transitions between my jump animation smoother, but when I try to code it in, it just snaps from 1 animation to another, which is the opposite of wh.
Now I am questioning if its even possible to lerp parameters.
does anyone know how to lerp variables and such? Here is my code and animation tree. Thanks in advance!
func _process(delta):
#ANIMATIONS AND COOL SHIT LIKE THAT
if is_on_floor():
anim_tree.set("parameters/Blend2/blend_amount", lerp(0.0, 1.0, 0.01))
if velocity.y > JUMP_VELOCITY-1:
anim_tree.set("parameters/Blend2/blend_amount", lerp(1.0, 0.0, -0.01))
It doesn’t look like you’re using lerp
correctly. That 3rd argument needs to vary between 0 and 1 over time. See the docs here:
@GlobalScope — Godot Engine (4.0) documentation in English
jgodfrey | 2023-04-01 14:58