Search code examples
unity-game-enginebulletphysicsbullet

Unity with Bullet Physics : Mesh Collision


I am trying to use Mesh Collision with a cube with hole model that created from Blender and export it to .fdx then import to my Unity project

Following this doc. http://bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Shapes

I am using bConvexHull for this object.

enter image description here

I drag the mesh into the field and press Build Mess. No error. And set BRigitBody to make it stay still.

After that i create a small red cube on top of the first object. And set BRigitBody to make it fall down to the first object.

After hit Play button, The red cube should fall down into the hole of the first object. But it just stay on top like this

enter image description here

What i have missed or did it wrong?

Please give me some explanation. Thanks.


Solution

  • A convex collider, by its definition, cannot have holes.

    Use btBvhTriangleMeshShape instead.