Objects falling into or passing through other soft/jello-like objects?

I posted this a month ago in the Physics section and it didn’t get any replies, figured I’d try posting it in scripting as it’s likely more of a scripting issue than a physics one.

I have some code that creates realistic piles of items by dropping them and letting them land ‘naturally’. Works great, except when I had a heavy, thin, flat gear. It was always just lying flat, hitting the hard ground on it’s edge, and falling over. Makes sense, but if you threw something like this onto soft earth, there’s a chance it would land in such a way that the edge would sink into the ground, and it could be stuck in the ground, not laying flat. This could also be applicable for firing things through soft targets like a ballistics gel.

Is there a way in the physics engine, or standard Unity scripts, to make an object “soft” so that other objects/colliders could pass through them? Or maybe an existing asset (which is not too expensive)? Worst case I might have to code it myself, but trying to save that time.

It’s clearly not the first time something like this is needed, just surprised I cannot find any reference to it anywhere.

Unity’s built in physics engine only supports rigid bodies.

There are assets available like this: https://assetstore.unity.com/packages/tools/physics/obi-softbody-130029

Although I’m not sure even this asset allows Rigidbodies to go through the soft bodies. The developer is quite responsive to questions on their forums though.

1 Like

I’d see if increasing the value of rigidbody.drag or rigidbody.angularDrag on impact with the ground gives you the desired affect.

None of what I’ve looked at seems to do what I want. It’s a minor feature for the app I’m working on, so I’m shelving the idea for now. Once the feature becomes worth playing with again, I have a few ideas on how to achieve it. I’ll post something once I do something with it. Thanks for all the info.