Hello! I have a problem I was wondering if it was familiar to somebody.
I have a top-down project with 8 direction movement. The player has a shield and he moves with the 8-direction behavior. The enemy has an 8-direction behavior to make a knockback and some physics to avoid overlapping when pathfinding.
When the player wants, he can press a button to get the shield up. This is just a sprite pined to the player on top of it that turns visible on press. This shield is just a sprite with no behavior
When the enemy overlaps the shield, he is knocked out of it with some 8-direction values.
Now, the problem. AT SOME POINT when the player has the shield, is moving, and overlaps the enemy, the player starts moving by itself in the direction it was already moving. Like if the movement key was being pressed. If I press a key in the opposite direction, the player stops moving, but when I release the key, it keeps moving in the same direction. Pressing the key makes it as if you start applying a force in the opposite direction of the current movement. Now, If I press the key in the direction the player is moving by himself, the movement stops. When I check the debug mode, it seems like the x and y vector are moving by themself, and pressing the key in the direction that the player is moving reset the values of those vectors to 0
Is this problem familiar to anybody? Any idea what could be happening?