Unsure what I’ve done wrong? I’ve followed the code step by step and I still don’t understand why the character will not move
I wrote this on my phone could really see how the code came out and retyped word for word my code since I didn’t copy and paste it. But still confused on the issue of why the character won’t move?
GD Quest
2D vampire game
Code:
extends CharacterBody2D
func _physics_process(delta: float) → void:
var direction = Input.get_vector(“move_left”, “move_right”, “move_up”, “move_down”)
velocity = direction * 600
move_and_slide
if velocity.length() > 0.0:
$HappyBoo.play_walk_animation
else:
$HappyBoo.play_idle_animation