I'm new to Godot. I'm trying to make my player move vertically just like when it's moving horizontally. I've tried a couple of thoughts, but unfortunately, I couldn't move him the I want him to move. I want to code my vertical movement in a similar way to my following horizontal movement code if possible:
var direction: = Vector2(
Input.get_action_strength("move_right") - Input.get_action_strength("move_left"), 0.0
)
velocity = speed * direction
velocity = move_and_slide(velocity)
And if it's not possible, how can I code it?