Godot Version
4.3.stable.mono
Question
I’m making a game where the player has the ability to move a pan and throw ingredients with it. My pan scene looks like this:
- RigidBody2D
– Area2D - responsible for catching player’s mouse input
– StaticBody2D - The body of the pan where we hold the ingredients (it has no scripts attached)
Of course, everyone has a CollisionShape2D
My ingredient is just a RigidBody2D with its CollisionShape2D
The pan has a dragging mechanism with the mouse (speed of dragging is limited). When the ingredient lands on the pan, everything is fine, StaticBody2D blocks the ingredient from passing through it. The problem starts when we try to move the pan, if I do it very, very slowly, the ingredient doesn’t pass through, but if I just yank the object a little harder, the ingredient flies through StaticBody2D.
StaticBody2D has only changed layer and mask to match the ingredient.
Ingredient’s RigidBody2D changes:
Default PhysicsMaterial with the bounce changed to 0.25
Can Sleep changed to False
Lock Rotation disabled
CCD changed to Cast Shape
What should I change to make it work? I’m having a hard time with it.