Hey,
I started learning Godot. And i was wondering if there is any way around the if statements in a character controller. Currently I am using this controller:
if Input.is_action_pressed("ui_right"):
velocity.x += 1
if Input.is_action_pressed("ui_left"):
velocity.x -= 1
if Input.is_action_pressed("ui_down"):
velocity.y += 1
if Input.is_action_pressed("ui_up"):
velocity.y -= 1
If anyone knows if it is possible to do something with a match statement please feel free to tell me. Or maybe there is a better or simpler character controller.
Thanks in advance
4rowswiss
(P.S: English is not my first language.... sry for the missspelling =) )