As the title says, I have a strange problem.
Here is my code:
func _process(delta):
# dont ask about this part pls
var player_pos = get_node("player").get_pos()
if (Input.is_action_pressed("player_move_right")):
player_pos.x += -PLAYER_SPEED * delta
if (Input.is_action_pressed("player_move_left")):
player_pos.x += PLAYER_SPEED * delta
if (Input.is_action_pressed("player_move_up")):
player_pos.y += -PLAYER_SPEED * delta
if (Input.is_action_pressed("player_move_down")):
player_pos.y += PLAYER_SPEED * delta
get_node("player").set_pos(player_pos)
Now, if I press for example the "player_move down key", the sprite moves to the left.
I would be happy if you could help me.
I know I could just switch the x's and y's, but it is strange anyway.