Sticky Collisions on CharacterBody2D, Help!

Godot Version

4.3

Question

When two “Entities” collide with each other, a strange beahvior occurs when the top of the Player’s hitbox touches the bottom of the Enemy hitbox: They stick to each other!

This isn’t intended and I’ve spent a decent amount of time trying to fix this and I assume there is a way to apply some sort of “margin” or a way to not allow two CollisionShape’s to overlap but I’m just not familiar with the lenguage yet. Any help is appreciated!

Bug_Colisao
Bug_Colisao2

Can you post the enemy movement script

1 Like

I changed the AreaShape to a circle and used move_and_collide() instead of move_and_slide() and it fixed the issue!

1 Like