3 hours ago, Scouting Ninja said:
Compound collisions and Joint collisions isn't the same thing
The term 'Joint collision' should not even exist. (From all you say i see it must be very confusing to handle physics engine as an Unity user, so what i say is not meant as correction, but in hope to limit some confusion...)
If you connect two bodies with a joint, they still remain two bodies, both of them are simulated, but a joint limits their relative degrees of freedom and can also include motors. If the joint limits all DOFs it is a 'fixed' joint, and the two bodies behave as if they would be only one solid body (compound). But the difference is:
* You can just enable or disable the joint to let the bodies disjoint or not (never a need to recalculate fused mass properties).
* You have to expect robustness issues like oszillation (jitter), much worse if the number of bodies becomes larger than just two.
* Inertia is not approximated by a single ellipsoid (so you could simulate complex shape more accurate if desired).
So in practice fixed joints are good for temporary connections, like a character driving a vehicle for a while an then continues to walk. But you always consider to use a compound instead for performance and stability reasons.
Compound really is to use multiple convex hull collision shapes to form a single body. Only one body is simulated by the physics engine. A collision against one of its sub-shapes can never cause the shapes to displace relative to each other. But you still have the option to remove / add / displace bodies yourself outside of the physics update. (Probably game engines do not expose all physics engine features.)
Usecase is to model a shape like a torus. You would need to join a large number of convex cylinder bodies to approximate such a shape. Using compound it is just one body solves and integration is as fast as for a simple box. (But collision detection is still more expensive because all subshapes need to be checked.)
The issues you get from up vectors / gravity still seems to be some kind of flaw to me. Probably caused by not making clear if those constraints are Unity constraints meat for procedural / kinematic animation, or physics joints meant for simulation. Those things should be seperated by both GUI and terminology, it seems this is done done totally right from what you say.
I really should take a closer look myself at those engines some day... i'm still left in confusion, although you've spent lots of efford. Maybe there is one more thing about inertia to tell - if you do not know that, it's a win:
Nonuniform inertia affects simulation robustness, meaning a long thin object is much more likely to cause jitter and such. So it is often worth to manually change inertia to be more uniform. E.g. for a ragdoll, the joints have much more impact on turning resistance than inertia anyways, so you can make each body to have uniform inertia and the effect is not noticeable, but jitter may be reduced dramatically. I guess this often happens automatically (Havok export tools had a checkbox to let the user decide), but it's worth to check it out. (Personally i often use inertia from a solid sphere that has the same volulme than the real body and replace the inertia numbers with that).
... hoping anything of this is useful
4 hours ago, Fulcrum.013 said:
I take this as an agreement that 3 number inertia is an approximation for anything that is not an ellipsoid. (Why do you physics guys always dodge this question? )
4 hours ago, Fulcrum.013 said:
It is not alternative, it is same.
No, i do not mean to use the matrix to have rotated representation of 3 number inertia, i mean something than can do more than an ellipsoid. I think Newton has support, but i also remember it form reading papers from the Baraff / Mirtich times, and i connect it with the term 'asymmetric inertia' (but that may be wrong).