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