- Home /
Problems with collisions while rotating a rigidbody
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: https://answers.unity.com/questions/23737/fast-collision-between-a-mesh-collider-and-a-conti.html (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
Answer by Baalhug · Sep 26, 2018 at 08:08 PM
Well, as I have been informed in forum, the new physics engine will cover that:
Your answer
Follow this Question
Related Questions
Mesh Collider STOPPING Objects Instead of Detecting Collision 1 Answer
How may I observe expected physical interactions while using Rigidbody.MoveRotation()? 1 Answer
Rigidbody doesn't rotate after collision 3 Answers
Mesh collider not colliding with ball properly 1 Answer
Camera and mesh not colliding 1 Answer