i want the sprite to look where its going like face the player sprite when its aproching him i gave the enemies the line of sight behavior
I use Set Mirrored.
You can find the closest enemy, if it is behind you set mirrored if it is in front set not mirrored.
Or if you are using simulated keys while <- set mirrored and while -> set not mirrored.
Develop games in your browser. Powerful, performant & highly capable.
Maybe this helps :)
when your enemy sprite sees your player
Set the enemy sprite angle = angle(enemy.x,enemy.y,player.x,player.y)
This will find the angle from your enemy to the player and set angle will turn them in that direction.