Container objects (cube)

mmic
Posts: 6
Joined: Thu Jul 11, 2013 8:34 pm

Container objects (cube)

Post by mmic »

Hello! With Blender I made a physics simulation with two objects. The first was a cube that served as a "container" is set as a static object and approximated by a triangle mesh. The second was a sphere internal to this cube.

The ball, which is inside the cube, collide correctly with all the faces of the cube never going out from it. I'm trying to do the same thing only with Bullet but with poor results. The problem is not with the ball but with the container. How do I say it is a cube, approximated by a triangle mesh? This is enough to get the same result I have with Blender?
razer
Posts: 82
Joined: Sun Apr 04, 2010 10:08 pm

Re: Container objects (cube)

Post by razer »

is cube in bullet example a static object as well?

May be you should create cube from mesh. (btBvhTriangleMeshShape and btTriangleMesh)

I know it worked for me. But I the correct way would be to have 6 separate body: walls, flow and ceiling