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
Sorry to get back so late I’ll have to check and see if that fixes it. But no I did not put () and yes I get about 7 errors but none related to that code if I’m reading it correctly. I’ve been handling work n kids lately I haven’t had a moment to hop back on lol
Errors are always bad, it doesnt matter if they are related to your current code. Warnings you could ignore (although they should be fixed at some point), errors should never be ignored and fixed immediately if possible