Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Randy_845 |
The player moves well, and all the animations work except the left one, it moves to that side but the animation doesn’t come out.
if Input.is_action_pressed("ui_up"):
movement.y -= velocity
see.set_cast_to(Vector2(0,-50))
animation = "Walking_Up"
if Input.is_action_pressed("ui_down"):
movement.y += velocity
see.set_cast_to(Vector2(0,50))
animation = "Walking_Down"
if Input.is_action_pressed("ui_left"):
movement.x -= velocity
see.set_cast_to(Vector2(-50,0))
animation = "Walking_Left"
if Input.is_action_pressed("ui_right"):
movement.x += velocity
see.set_cast_to(Vector2(50,0))
animation = "Walking_Right"
move_and_slide(movement)
animations.play(animation)