Stacking cubes with rigid bodies isn't working in DOTS physics

I was wondering if anyone else has seen the problem with stacking rigid bodies in DOTS? Cubes stacked will slide off each other and fall to the ground.

image

I was able to work around the problem by adding a fixed joint on the bottom connecting the cubes with a break force and torque of 0.001 which is the minimum. This isn’t ideal, coding rarely is. I’ll be glad to send the demo project with the fix and the problem. Let me know if you have a better solution. Thanks in advance.

This is a common problem in Unity Physics, it being a stateless engine and all. Havok integration for Entities doesn’t have this problem. PhysicsStep has some settings you can tinker with that are meant to help with stabilizing the simulation. You can try enabling the heuristics with default values using PhysicsStepAuthoring or configure the heuristic settings in PhysicsStep manually in code.

1 Like

That totally worked! Thanks.