Two CharacterBody2D nodes get 'stuck' to each other, don't signal collision

Godot Version

4.3

Question

I’m making a game where a nozzle squirts out various pastry fillings/toppings onto pastries rolling by on a conveyor belt. Both the pastries and the fillings/toppings are CharacterBody2D nodes. They each have a Sprite2D and a Collision2D child node. When a filling/topping node lands on a pastry, they both send a collision signal and I change the sprite texture based on that. For example, if lemon filling lands on a pie shell, the pie changes from an empty shell to a filled shell. This works 95% of the time. However, if the filling/topping hits the left corner of the pie’s collision shape, it sticks there and no collision is signaled. You can see an example here where it’s working fine:

And here where the lemon filling is stuck on the left edge of the pie’s collision shape:

Any help/ideas much appreciated!

What signal are you sending? CharacterBody2D does not have a signal for collisions.

If you are using move_and_collide or move_and_slide maybe your CharacterBody2D thinks the other is a moving platform. Try setting the filling to Motion Mode “Floating” or removing the collision layer the pie resides in from the filling’s “Platform Floor Layers”

Thanks. I’m using move_and_slide. Changing the motion mode to floating fixed the issue. That was an annoying issue with a simple solution!