godot_recipes
godot_recipes copied to clipboard
[Discussion] 8-Directional Movement/Animation
Discussion for http://godotrecipes.com/2d/8_direction/
Hi I cant seem to get direction number 4, when I try the code in the keyboard input section.
I fixed it by adding a = stepify(input_dir.angle() , PI/4) / (PI/4) a = wrapi(int(a), 0, 8) to the keyboard-input code section, I copied the way you did it in the mouse control section.
Thanks