I'm making a simple platformer, but I'm having difficulty with the enemies, as they are bouncing off walls at an angle, when I only want them travelling on 1 axis. This issue only arises when the enemy travels flush with a wall.
The other problem I'm having is that when the player is in a gap between a wall and an enemy, the player is still dying, despite the width of the gap being the same width as the player.