Hi,
I have created a floor as a btBoxShape, let's say with the extents 50 x 10 x 50.
Now I've created 5 boxes, small, lets say one of them is 0.06 x 0.06 x 0.06
and another one is 0.15 x 0.31 x 0.20.
And the others are small, too.
Now I let them fall from the "sky" to the "ground" with a gravity of -9.81.
When they collide with the ground, the do not "fall asleep" but they jitter a bit.
Up and down most of the time. They never sleep. And the jittering can be seen.
When I try to let them fall on a floor generated from a box shaped TriMesh, some of them
sometimes fall through the TriMesh.
Changing the mass of the objects does not do anything against the jittering on
floor generated as a box-shape or against the falling through the tri-mesh.
I tested it with the ground as a btCollisionObject AND as a btRigidBody as kinematic object.
When I make the boxes bigger, they all work as expected.
But I need some small objects in my project.
Why do small boxes jitter when the are fallen on my floor, why fall they through the TriMesh sometimes?
Is this a bug? What can I do against that problem?
Greets,
DomiOh
Btw: I used the last bullet build and some builds before and the problem stays the same.
When a small video of this is needed I am able to provide one.
small objects "jittering" when they fell on another object
-
- Posts: 3
- Joined: Mon Jun 24, 2013 6:57 pm
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: small objects "jittering" when they fell on another obje
The size of the box is too small relative to the simulation fixed substep.
You get better results if you use a smaller substep:
or even smaller substeps such as 1./480.f or 1./10000.f.
You might need to increase maxNumSubsteps, but if the CPU is slow you can still see a slow-motion effect if the CPU cannot simulation in real-time.
Thanks,
Erwin
You get better results if you use a smaller substep:
Code: Select all
float fixedsubstep = 1.f/240.f;
int maxNumSubsteps = 10;
world->stepSimulation(deltaTimeInSeconds, maxNumSubsteps, fixedsubstep);
You might need to increase maxNumSubsteps, but if the CPU is slow you can still see a slow-motion effect if the CPU cannot simulation in real-time.
Thanks,
Erwin
-
- Posts: 3
- Joined: Mon Jun 24, 2013 6:57 pm
Re: small objects "jittering" when they fell on another obje
Erwin, thank you for your reply. I found out myself just few minutes ago.
But your additional infos are very useful for me.
Thanx.
But your additional infos are very useful for me.
Thanx.