Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Reganazer |
When I use .play() It says " Invalid call. Nonexistent function ‘play’ in base ‘GDNativeClass’."
func get_input():
var vy = velocity.y
velocity = Vector3()
if Input.is_action_pressed("move_forward"):
velocity += transform.basis.z * speed
anim.play("leg_movement")
if Input.is_action_pressed("move_backward"):
velocity -= transform.basis.z * speed
anim.play("leg_movement")
if Input.is_action_pressed("move_right"):
velocity -= transform.basis.x * speed
anim.play("leg_movement")
if Input.is_action_pressed("move_left"):
velocity += transform.basis.x * speed
anim.play("leg_movement")
You left out some code. What have you assigned to anim
?
kidscancode | 2020-05-26 17:43
var anim = AnimationPlayer
Reganazer | 2020-05-27 15:27