CharacterBody2D is broken! Or at least wonky as

And that is how I came to this theory.

A couple of notes:

*Running on version 4.2.1
*Problem is that the enemy hits the wall and doesn’t change direction.
*Tested (off-camera) on an unmodified version of the demo. Same behavior.
*I’m by no means a pro, so I could have made an obvious oversight.
*With that said the code is sound and leaves no room for interpretation (if it hits wall: do this, period).
*The wall code however is related to slopes. This is what brings me to the conclusion I did.
*This is a part 2 of a previous video in which I thought I had solved the problem. I didn’t.
*The problem was eventually solved but the solution is less than ideal as it comes at the cost of proper functionality.
*Also this post is not about solving the problem but understanding it so that we can come with more elegant solutions.
*Maybe I was dumb and this was the proper behavior all along.