Consider the player with a rectangular
and a round enemy with a
CollisionShape2D and a little bigger
I observe frequent collisions with no
body_entered signal sent by the enemy area.
I have tried to reduce the radius of the collision shape in the enemy. It works, but enemy behavior against walls is not satisfaying anymore.
My question was unclear... Bouncing is not appropriate to describe what is happening.
Player and Enemy are
After some reflection, I have an hypothesis:
Maybe it is because
x direction each time
_is_on_wall() which means that he changes direction when he hits the player too.
Anyway, if changing direction is the cause of the absence of detection of the player Body by the enemy Area, for the player and enemy to collide, the body of the player must be in the area of the enemy.
For @Theraot remark on adding on Area to the player, I have decided to leave to the enemy the responsability to detect and damage the player, because it is easier to make type of enemy this way I presume.