collision primitives without depth
-
- Posts: 7
- Joined: Mon Oct 30, 2006 7:44 pm
collision primitives without depth
How would bullet treat collisions of shapes that have no depth (e.g. C4's plate primitive)?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Bullet requires moving/dynamic shapes to have some volume. Static plates/triangles would be no problem. The reason is that using discrete collision detection will easily miss collisions, but also inertia tensor and physics simulation require some volume. Once the continuous simulation is enabled, you might be able to use Bullet with very thin shapes, but no depth at all means you have to approximate some valid inertia tensor.How would bullet treat collisions of shapes that have no depth (e.g. C4's plate primitive)?
For moving objects, Bullet supports/works best with shape sizes in the range of say 15 centimeter up to 10 or 20 meter (units).
If your machine performances allows, you can decrease the fixed simulation timestep (the 3rd parameter, which defaults to 60 hertz). This can increase stability for thinner objects, but that is just experimental. If you like to experiment: check out the CcdPhysicsDemo, and decrease the height of the cylinders btCylinderShape, and change line 172 into:
Code: Select all
maxSimSubSteps = 10;
float fixedTimeStep = 1.f/240.f;
int numSimSteps = m_dynamicsWorld->stepSimulation(dt,maxSimSubSteps,fixedTimeStep);
Erwin