how to control the character with the button?
I'd like to move my character left and right using the button
func right_press(): velocity.x += 1 velocity = velocity.normalized() * speed and func _physics_process(delta): right_press() velocity.y += antgravity * delta position.x = clamp(position.x, 20, screen_size.x) move_and_slide(velocity)
but it doesn't work. The character flies to the right.