When enemies have a wall collision within -1 or +1 of their collisionPointX, sideWallDetected flag becomes true, and its logic makes enemies not move away from the wall.
The infamous sidewalled bug. Believe it or not, this is a regression bug, one which I was to fix, but development tasks shifted and when I came back, I forgot how I had planned to fix it.
The regression bug was with Satyrs jumping, who had some issues with horizontal movement (physics or AI behaviour?), and I added a sideWallDetected flag and their jump was fixed.
Except... satyrs and all monsters were bugged at sidewalls, but I noticed this weeks later.
Removing this flag and its logic, makes all non-jumping enemies work normally (see hollows at level editor, as a prime example where I override the sideWallDetected flag)
tl;dr: Remove 'sideWallDetected' flag and its logic, and fix the original jumping bug, whatever that was.
Description of this bug
When enemies have a wall collision within -1 or +1 of their collisionPointX,
sideWallDetected
flag becomes true, and its logic makes enemies not move away from the wall. The infamous sidewalled bug. Believe it or not, this is a regression bug, one which I was to fix, but development tasks shifted and when I came back, I forgot how I had planned to fix it. The regression bug was with Satyrs jumping, who had some issues with horizontal movement (physics or AI behaviour?), and I added asideWallDetected
flag and their jump was fixed. Except... satyrs and all monsters were bugged at sidewalls, but I noticed this weeks later.Removing this flag and its logic, makes all non-jumping enemies work normally (see hollows at level editor, as a prime example where I override the
sideWallDetected
flag)tl;dr: Remove 'sideWallDetected' flag and its logic, and fix the original jumping bug, whatever that was.