![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Caio Henrique |
I’m trying to change the animation, like this (but it’s going wrong):
onready var raycasts = $raycasts
func _set_animation():
var anim = "Idle"
if !is_grounded:
anim = "Jump"
elif velocity.x != 0:
anim = "Run"
if $anim.assigned_animation != anim:
$anim.play(anim)