Complex Object Out of Control Collisions

Hello, I’ve been having an issue for several days and I was wondering if someone could shed a light on it. I have a small modular robot (see bellow) that has 3 wheels and 4 joints. These robots can be linked together to form larger configurations like the quad shown below. However after some simulation it appears that the quad jumps up into the air and spins uncontrollably. I assume that this is due to some of the collisions from the components, but I don’t know what I can do about it. My fixed timestep is set to 0.001 and my solver iteration count is set to 20. Any help is greatly appreciated!

46196-smore.png

Obviously there are some best-practices you must follow, but from the looks of this, you’re aware of these already.

A respectable gap between colliders is a must in tight-quarters high-scrutiny situations like this. Also, you should separate all qualifying objects into non-interactive layers, so you have the most streamlined matrix of inter-active objects possible. I’m not really sure that applies in your situation from looking, since all their activity is inter-related.

Think it out, though; could any objects belong to layers which don’t raise collision events with each other? Depending on how all this works, for instance, perhaps wheels never collide with other wheels, bodies with other bodies, etc. That may or may not address the problem about which you’re posting, however.

Apart from that, I think it’s a valid statement to claim Unity’s PhysX system is designed for games first. Simulations such as this may not be entirely feasible. I estimate a truly incredible number of per-frame physics calculations necessary to drive this compound object. I’m really surprised it works at all; PhysX is impressive.