walaber wrote:I don't need fancy self-balancing or anything for this game, but I do need really solid joints that can simulate a human well.
The game works by providing the physics with goal poses for the ragdoll, and the joints simply try to match that pose, given their limited strength. Ideally the joints also have rotational limits as well. I do the standard thing of turning the joints "limp" on a crash.
In my current implementation I've had a lot of trouble with twisting tricks, I've had to cheat and use my own torque forces to get the character twisting, and I've struggled a lot with the behavior.
That's what the inverse dynamics solver does Walaber, is long to explain but once you get it, start to to make sense to you. All I am going to say is that you can't see the scope of the problem complexity because there are emergence behaviors that comes out of the physics simulation that you are not aware of but that are very real, they are real because you experience them in reality.
One such behavior is conservation of angular momentum of the whole system when in mid air.
I am not a gymnast and I have never done any kind of stunts, but what I know about physics allow me to understand why a gymnast can do tricks in mid air by contorting his body and changing his mass distribution.
what happens is that when the contraction changes the mass distribution, this means the inertia changes, and because angular momentum should be preserved, this means that the angular velocity of some bodies part must change is such way to preserve angular momentum.
The newton engine been an acceleration based engine is develop based of the preservation of the total instantaneous momentum, this is why is can generate those behaviors, at least in principle.
Some engines can't do that because they focus more on speed so there use position correction to hide errors from the user, but the effect is that you get stuff that moves but is not really physics simulation.
I am not about to give a lecture about these thing anymore, the general public do not really care,
is only when some user sees these weird thing that they reluctantly try Newton and even them their first thought is to go back to what the were using, but I am ok with that.
What I can do to get you start if you are interested, is that I can make a new demo in the SDK, and try to recreate a simple version of that man jumping down the trampoline so that you can see how things are set up using the global inverse dynamics system, them you can go on from there.
The the twist effect you are concern about should emerge from mere fact that the character trying to reach the specified pose, at least it should show sign of the effect and of course you can always enhanced it, but it should be a physics consequence.
There is difference between exaggeration an get some style and make it up because the toll you are using is inadequate. Most people always make that false equivalence and always conclude
that if they all has limits then speed is the only thing that counts.
One a basic demos is set up can see how things are setup and you can present repro cases for future bug or features. The engine should be able to map to the Physics every thing you have to the physics.