Add my own part to move backwards on down

This commit is contained in:
Daniel Siepmann 2024-03-26 10:53:32 +01:00
parent fc1fc0b784
commit bbeb63cc62
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -11,8 +11,10 @@ func _process(delta):
direction = +1
rotation += angular_speed * direction * delta
var velocity = Vector2.ZERO
var velocity = Vector2.UP.rotated(rotation) * speed
if Input.is_action_pressed('ui_up'):
velocity = Vector2.UP.rotated(rotation) * speed
position += velocity * delta
if Input.is_action_pressed('ui_down'):
position -= velocity * delta
position += velocity * delta