Jump to content

Bones Ragdoll


The Snow Irbix
 Share

Recommended Posts

Also, Sam was kind enough to make a fantastic "source package" for his old man ragdoll.  http://visualiser.fr/Babylon/oldman.zip  I love his rag dolls... I have plans for them... if I ever get around to messing with them. 

 

Just push the x30 button, wait for it to finish, turn on your favorite song, and tap his F button to the beat of the song.  TOO FUNNY!

 

If you F(ire) them WAY UP into the air, when they land, they get stuck in the ground.  Then it's even MORE fun to tap the F button and watch their body parts stretch... trying to applyImpulse out-of the ground.  Even FUNNIER!  Love it.  It appears that the contact point for his F-impulses... is the top of the ragdoll's head.  Perfect.  :)  I love throwing people around by the hair.  I do it to my kids all the time!  (I don't have kids, and thank goodness, eh?)

 

I think... maybe... his ragdoll thing has a memory leak, though.  I have (possibly) seen it cause some troubles when it's sitting in a window running for a long period of time.  Maybe expert leak-finders can check it and report.  Also, it MIGHT be BJS version-sensitive, but maybe that was for his IA path-following thing.

 

I zipped-up that, too, but it's certainly not as all-inclusive as the zip for his Old Man project. 

 

Here's the zip for the IA path-following crowd thing if anyone wants it.  I am quite sure it is BJS 1.14 only.

 

Sorry for the subject wandering.  Irbix is looking for a basic skeletons/bones demo that doesn't use physics (and thus might be able to avoid quaternions)... and he's not the only one who has asked for such.  Preferably, without imported models, I suspect.  I hear that's not an easy demo to accomplish... but maybe that's just a vicious rumor.  :)  How about a BJS scene of CanadArm... the Canadian-built robotic arm on the International Space Station?  That would be a good start to learning armatures, skeletons, and bones, right?  And it might be darned fun to play-with, too.  We could throw space-walking ragdolls around by their helmets.  :D

Link to comment
Share on other sites

I have another request to continue my work :

How can I update the position of a bone ? ^^

I found this in the Samuel script :

 

b.prototype.compute = function(a, B) {
            var c = this.offset;
            this.helper.locallyTranslate(new BABYLON.Vector3(-c.x, -c.y, -c.z));
            c = this.helper.getWorldMatrix();
            c.invert();
            c = this.bone.getWorldMatrix().multiply©;
            this.wait || this.bone.update©;
            c = BABYLON.Quaternion.Inverse(this.qset);
            this.helper.rotationQuaternion = this.mesh.rotationQuaternion.multiply©;
            c = new BABYLON.Vector3(this.mesh.position.x - a.x, this.mesh.position.y - a.y, this.mesh.position.z - a.z);
            this.helper.position = c;
            this.wait = !1
        };

And the doc : http://doc.babylonjs.com/classes/2.2-alpha/Bone

There are many matrix, but I don't know how are they created and which one is linked to the position of the bone.

Which matrix should I update ? :(

 

I have may be find something :

http://www.babylonjs-playground.com/#11BH6Z#23

http://www.babylonjs-playground.com/#11BH6Z#24

I update a matrix...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...