My pleasure. I bet you sort-of wish that the yBot would automatically go “ragdoll-ready”… with tendon-limited physics joints like human joints are, and separate physics impostors for each major bone of the armature.
You know… ready to fall from a Ferris wheel… flailing brutally off-of the iron cross-members… landing with a leg behind the head and another up the butt. Dynamic Assessment RagDoll Tutorial | benfavaloro
It’s much more interesting than a single box impostor, eh? I agree. I’m hoping someday… we can have a “snap-on” quick-add physics-ready ragdoll armature, but it would be difficult to “universalize” that armature (so it works on ANY skeleton).
To be frank, I don’t know where the future of snap-on ragdoll physics will go. One would suspect… that most of the world wants it to become much easier to do.
Oimo.js Ragdoll There’s the OimoJS ragdoll, and we have OimoJS plugin, along with CannonJS and AmmoJS/Bullet. I dunno how much you know about physics joints, but, you are allowed to use collision masks, filters and groups… to determine WHICH impostors are allowed to collide… with which others.
To hurry-along my point, the Oimo ragdolls are rather “stiff” because they did NOT turn-off collisions between impostors on each end of the joints. They put very little joint-gap between the shapes, and it is THAT… that causes Oimo rags to be stiff. Their hinge joints won’t flex very far… due to shape collisions. There is a button to turn-off the collisions. Give it a try. The joints bend much further and the dolls are less stiff. I’m not sure what type of joint limiters go-active… when collisions are set OFF… but there appears to be SOME joint limits that go active. Someday I’ll study it… maybe.
The best ragdoll I have seen so far, with BJS… is Sam Girardin’s “Old Man”… Character Study - Babylon.js - Samuel Girardin - It won’t take long to learn about the good and bad of ragdolls and hard-animations… after you push a few hundred buttons on Sam’s “lab”. I like pushing the x10 button and then repeatedly tapping the “F” button… to the beat of a cool song… such as Diner. TOO FUNNY!
Generally speaking, when animating… only crude box physics surrounding entire body - allowed. When gravity on and full boney-physics and joints/limits active (ragdoll mode), animating is nearly impossible unless done by applying physics forces. Keyframe animations and physics-active skeletal ragdolling… don’t get along. One movement boss, or the other, but rarely/never both movement-bosses used at same time. Sammy’s “old man” ragdoll makes this reasonably clear. Either you are animating (walking, running, standing-idle, etc)… or you turn on gravity and go ragdoll mode. Doing both at same time… probably near impossible.
Just my opinions… feeble knowledge levels, etc. I’m probably a solid 40% wrong but, maybe not.
Sam’s “Old Man” ragdoll armature “lab” thing… is older. I think it uses BJS 1.10 or 1.14. And, I think I have a complete archive of it: http://urbanproductions.com/wingy/babylon/oldman/Oldman_onefile.zip I think @Raggar did a little work trying to make it into a playground… let’s see if he has any comments about that.
AmmoJS has rope impostors! Although they are still performance-piggy unless you drive a Cray, they COULD signal a future of using invisible puppet strings to control a ragdoll.
bone.physicsImpostor.applyImpulse(directionWithMagnitude, whereUponTheImpostor) is probably lots easier and does the same. But, can you imagine how many little physics applyImpulses are needed to cause a ragdoll to stand-up straight and walk, with proper arm-swing and leg motion? Probably a few hundred impulsings per second… at all sorts of locations, directions, and magnitudes. erf.
But a true walking ragdoll, moved only with physics forces and not with keyframes… would be SWEET, huh? Continuous up-impulse on both shoulders… to keep body from collapsing to floor. Same on top of head, to keep head from tipping over. (Sam’s Old Man is hung by/from his head.) Then… try to get natural walking leg movement, using TONS of little applyImpulses per step. HARD, I bet.