Sprite flip_h gets set to false

Godot Version

4.3

Question

When I run my game the flip_h of my player sprite get set to false, even if I turn it on in the editor before running the game.

This is what my code looks like, and it is the only place I manage the flipping of the sprite:

func _physics_process(_delta):
	if state_machine.check_if_can_move():
		if velocity.x > 0.0:
			model.flip_h = true
		elif velocity.x < 0.0:
			model.flip_h = false
		handle_inputs(_delta)
		move_and_slide()

The character can move and everything, it is just the flipping that is not happening. I could use a scale set to -1 or to 1 to get it work maybe but I want to what am I doing wrong.

Please help

do you use a animationplayer?

1 Like

Hello, Yes I do use them and I saw the flip_h in there.
However, when I was using 4.2 it was working fine, just recently upgraded to 4.3 and the issue came up.

I deleted the flip_h in the animation, and now it’s working.

I did not think of the animation player

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.