Hello,
So I have the player as a CharacterBody2D (with a remotetransform2D as a child that moves a camera, if that's any relevant info) and an enemy as a CharacterBody2D. The enemy is programmed to run right next to the player, stop in-place, and play an attack animation.
Currently, when the enemy collides with the player (both use MoveAndSlide() to move), the enemy seems to stick to the player, moving with the player exactly even when its velocity is supposedly zero.
I assume this is part of the behavior of MoveAndSlide where the movement of one characterbody affects the movement of another characterbody, but you'd assume that the player moving in the opposite direction wouldn't drag the enemy behind them as well. Note that I also have the collision shapes as capsule shapes.
Is this expected behavior? If so, what are ways to fix this? Am I doing something wrong? Thanks for any assistance.