The Snow Irbix Posted September 7, 2015 Share Posted September 7, 2015 Hello everybody !!How can I do a ragdoll like this : http://lo-th.github.io/Oimo.js/test_ragdoll.htmlBut on bones ? I've found this topic : http://www.html5gamedevs.com/topic/12316-animate-a-bone-through-code/ But I want a simple way to do my ragdoll, because I'm a newbie with matrix Thank you ! Quote Link to comment Share on other sites More sharing options...
Temechon Posted September 7, 2015 Share Posted September 7, 2015 Hi, I strongly suggest to see how Samuel handled it here: http://www.visualiser.fr/Babylon/character/default.htm The Snow Irbix 1 Quote Link to comment Share on other sites More sharing options...
The Snow Irbix Posted September 7, 2015 Author Share Posted September 7, 2015 What a huge script !It seems to use many Quaternions... Have you an idea what function make the transformation between original bones and physic bones ?It will be very helpfull to have just a base Quote Link to comment Share on other sites More sharing options...
Wingnut Posted September 7, 2015 Share Posted September 7, 2015 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. The Snow Irbix 1 Quote Link to comment Share on other sites More sharing options...
The Snow Irbix Posted September 7, 2015 Author Share Posted September 7, 2015 Aha you're a weird guy ! I love it ! I will start my experimentations and I will keep you posted ! That's a good idea, the CanadArm ! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
The Snow Irbix Posted September 7, 2015 Author Share Posted September 7, 2015 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, { 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/BoneThere 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#23http://www.babylonjs-playground.com/#11BH6Z#24I update a matrix... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.