The game I'm working on is an overhead game with 360 degree angle/motion. I'm trying to create an enemy character that can harm the player on collision but only when the player has their back turned away to them. If the player is facing the enemy they are able to block the attack. I know this needs some sort of check on the angle of both objects but I'm drawing a blank on what is the right code to use. Any help is appreciated!
Develop games in your browser. Powerful, performant & highly capable.
Something like this maybe?
System->Compare two values-> abs(angleDiff(player.angle, enemy.angle))>90
Works perfect, thanks dop2000.