Im trying to program a sprite that chases my player. The enemy starts at the left of my npc, but the second it goes to the right, it flips upisde down. I know i need to mirror it somehow, I just dont know. Could I get some help on figuring out why it does this, and how to fix it? Thank you so much in advance
Develop games in your browser. Powerful, performant & highly capable.
So you are using pathfinding behaviour ? Try disabling Rotate Object in the properties.
No, Im using line of sight
You can use "Set Flipped" in the sprite actions to flip the sprite vertically.
With what ? LOS on its own does not move a sprite and chase a player.
I use LOS and then use it to set Angle towards Player.X and PLayer.Y
Then i have it move forward 1 pixel when the player is in LOS
Is there something else i should use?
You could compare the angle of the sprite. If it's between 0 and 180, set it not mirrored, and if it's between 180 and 360, set it to mirrored. :)
Same as above but do this on a separate object, so the object which is using LOS and following the player would be invisible, the animations object which you can see is a separate one pinned to the other object and mirrors accordingly but does not have any of the set angle events.