PDA

View Full Version : Bullet: Keeping parts inside a box?



vector
01-29-2017, 03:14 AM
Hi

I'm trying to keep a parts object inside a box, but when calculating all the parts went through the bottom of the box. They keep inside for a moment but when collide themselves they leave the box.

I keep the sizes and geometry as recommend the manual :about 1m height, all quads and/or tris, recipient with thickness...

135781

Any idea What I'm doing wrong? Thanks

pinkmouse
01-29-2017, 03:40 AM
The first thing I would do is add many more divisions to your box. My rule of thumb is that poly's in the, (in your case), box object should be spaced apart about half the size of the coins. I also, (and this is highly likely to be completely incorrect :) ), don't like triangulated collision objects.

You may also want to reduce the bouncyness, 30% is way to high for metal, (unless it's a spring!), this is putting energy into the bullet sim that will cause glitches. The last option is to increase the frame rate of the sim, it's under the World tab.

vector
01-29-2017, 04:28 AM
Hmmm, not bad: I only lost five :) I'll keep playing with them to improve the result

Thanks a lot, Pinkmouse

unstable
01-29-2017, 06:04 AM
I can't tell what size your object is, but what I've found in the past is that Bullet doesn't like small items. Sometimes increasing the size of all objects resolves this situation.

prometheus
01-29-2017, 07:19 AM
I can do this without even tripling, without box thickness...with a 30cm box and fill it with coins.

here´s something to be aware of..
for accurate mesh collisions, mesh may prefered, though it is slower to calculate.
you may also need to raise collision margin.
you may also need to check dynamic framerate, so increasing that may help with more accurate collision..though the calculation will be slower.
also solid coin pieces with solid mass distribution and to little mass seem to be proned to fall through objects, try change the mass specification to given mass.

vector
01-29-2017, 11:11 AM
I can't tell what size your object is, but what I've found in the past is that Bullet doesn't like small items. Sometimes increasing the size of all objects resolves this situation.

Thanks, unstable and Prometheus. The box is 1'5 m height. Not the real size but as all you said, it's needed for a good calculation. I duplicated the size and it works better.