- Edited
func _process(delta: float) -> void:
var input_vector = Vector2.ZERO
input_vector.x = Input.get_action_strength("move_right") - Input.get_action_strength("move_left")
input_vector.y = Input.get_action_strength("move_down") - Input.get_action_strength("move_up")
input_vector = input_vector.normalized()
if input_vector.x > 0:
$PlayerSprite.set_flip_h(false)
elif input_vector.x < 0:
$PlayerSprite.set_flip_h(true)
was wondering if flipping my Sprite would cause any significant lag in the long run(im using similar code in other process functions too) i was wondering if there was a more elegant way or if the engine is smart enough not to tick that box every frame