- Home /
Rigid bodies don't interact with each other.
Hello,
I seem to have a weird problem or I'm just missing something. When I import 3D objects and attach all required components to them - rigid body, mesh collider, mesh renderer they don't interact with each other. They collide only with primitive objects I create within Unity (cube, sphere, etc).
I even tried the following - created a cube in 3ds Max and import it in Unity - duplicated it and the cubes from max don't collide or interact in any way. Then I created the same cube from the Create Game Object menu in Unity and everything is fine. Unity's cubes collide with 3ds Max's cubes and each other, but the Max's cube collide only with objects created in Unity itself. What could be the issue here?
Try making the mesh colliders convex (there is a checkbox on the inspector for it IIRC).
Answer by Michael-Thomas · Oct 15, 2014 at 06:41 PM
The problem is that your objects are using Mesh colliders, which have some limitations. From the Mesh Collider docs:
All Mesh Colliders can collide with any primitive Collider. If your mesh is marked as Convex, then it can collide with other Mesh Colliders.
Of course, it actually should be convex if it's marked as such or else weirdness will result.
That seems to be the problem. I wonder how I missed that, since I've red those docs.
Is there a way to actually use a more complex mesh for collision than a primitive or convex mesh collider?
The preferred solution in many cases is to attach multiple primitive colliders that approximate your shape. If these are all parented to the same rigidbody, they should act together. Not sure if that would be sufficient in your case.
Thank you! To answer my question above, I see there are scripts for more complex meshes as well.