- Home /
How to make objects non-penetrable, inelastic
I have my rigidbodies with box colliders which stack up on top of each other. The thing is I don't want them to penetrate into each other. When I set "Min Penetration For Penalty" to zero, objects just vibrate and can not come to rest.
Also I want them to be inelastic. I mean like a chunk of iron. They should just fall and stay that way. But they bounce and flex. Even if I set bounce threshold to 100 they still bounce, and I don't even know how to set their elasticity. They should stay solid even if 1000s of other objects stack on them.
How can I achieve this?
I don't know what you mean when you say "flex" and "stay solid". It sounds like you're describing a flexible body ins$$anonymous$$d of a rigid body.
But anyway, you can stop the jiggle by using a no zero value for "$$anonymous$$ penetration for penalty", like 0.01. You can also assign a physics material and set bounce to zero, although that is the default value.
See if any of thise makes sense and I'll write a proper answer if it does.
Stacking of rigidbodies is a tricky thing to solve and things like "$$anonymous$$ penetration for penalty" are there to hack the solver for better results. I am not sure what do you mean by penetrating here... try having lighter objects on top (lower mass), having heavier objects sitting on light ones usually doesn't work well. Then you can try increase physics solver values (eg. iteration count) or enable continuous collision detection.
RigidBody means it can't possibly flex, but to set bounciness, use physics materials