I'm working on a simple shooting game where enemies spawn randomly from off screen spawn points. Enemies spawning from the left and centre of the screen look normal but anything spawning from the right appears upside-down, like in the screen shot:
All the sprites were loaded facing the right. Is there a way to fix this?
I'm guessing you're setting the enemy angle towards the player when they're created
So the right-facing enemy on the right side of the screen is rotating a full 180~ degrees and ends up upside-down
I couldn't find an exact entry for enemy angle in the event sheet but the enemies have Bullet behaviour so it sounds right. Is there a way to fix the 180 degree rotation? I tried disabling "set angle" but then the enemies don't come anywhere near the player.
Develop games in your browser. Powerful, performant & highly capable.
you want the set angle set to Yes, for the enemies coming from the right side, you need to use the action "Set Flipped". This needs to be set where the enemies are created - there is probably an action the sets the Bullet angle of motion towards the player.
(so if the enemy X is greater than the player X, then Set Flipped.)
Many thanks AllanR, using Set Flipped worked. :)