I have an enemy and when it hits a wall it changes its direction, but it also happens with the player
I would like the clash with the player not to change the direction
How could I fix it
Script Enemy
if is_on_wall():
direccion.x = 1 if direccion.x == -1 else -1