I have a bucket with some objects (dice) inside and I need to move and rotate the bucket (programatically) to let the dice fall from it. I’m using mesh collider in the bucket and box colliders in the dice. The bucket and the dice all have rigidbody attached, and I tested all combinations of collision detection on them (now dice have continuous and bucket has continuous dynamic).
The movement (translation) of the bucket works fine with dice in it (using rigidbody.MovePosition). But when I rotate the bucket (using rigidbody.MoveRotation) sometimes (quite often) dices pass through bucket’s mesh and get lost.
I’ve been researching a lot and the best related post I found about this problem is this: fast collision between a mesh collider and a continuous dynamic rigidbody - Questions & Answers - Unity Discussions (See specially the last comment on the answer).
Maybe I can slow down the rotation of the bucket trying to find a speed which dice don’t come out of the bucket too soon but they don’t pass through the mesh either, but I really dislike that solution because I can’t be sure it always works.
So… Is really impossible to rotate a mesh collider (no matter the rotation speed) containing box colliders without having object trespassing behaviour?
Thank you in advance