joshcamas Posted September 11, 2014 Share Posted September 11, 2014 Hello guys! I've recently been playing around with Babylon, and having a blast! One feature that I'm interested if it exists is controlling specific bones in an armature. I'm guessing that when you export a armature to babylon, it just turns into a "normal" mesh with a animation and such. Controlling specific bones would be awesome to "interpolate" between two different animations, as well as controlling foot motion, etc etc. Thanks!-Josh Quote Link to comment Share on other sites More sharing options...
joshcamas Posted September 12, 2014 Author Share Posted September 12, 2014 Ok, so after looking at docs and stuff, I'm 99% sure that a bone's position/scale/rotation is controlled by it's matrix, and you can edit said matrix... Anyone know how matrix's work and such? Quote Link to comment Share on other sites More sharing options...
gryff Posted September 13, 2014 Share Posted September 13, 2014 Hi josh, welcome to the forum One feature that I'm interested if it exists is controlling specific bones in an armature. You might want to take a look at this effort of mine: Desk and Book There are two rigs - one for the book and one for the desk In the case of the desk, each drawer and door is assigned to a specific bone in the rig (by appropriate weight painting). I then created an animation which has all the drawers/doors open or closed. Clicking on a drawer/door just drives the animation for the bone associated with that door/drawer. More details on this forum here: The Desk - an experiment with animation 2 Feel free to download and hack into my files. Hope they are of help. cheers, gryff Quote Link to comment Share on other sites More sharing options...
joshcamas Posted September 13, 2014 Author Share Posted September 13, 2014 Thanks for that, I'll have fun looking into your code, as well as this will be VERY useful to make a player do two things at once, aka run while swinging a sword. Awesome! However, what I'm needing is editing a bone's rotation in real-time, in-game. Example of why: Player is standing still > play animation_standPlayer clicks "w" > play animation_walkPlayer let's go of "w" > play animation_stand The problem with this is that it creates a jerky-movement when you switch from walking to standing. This is ugly.What someone could do is have another function that interpolates the current rot/loc/scale to the next animation, frame-by-frame. Thus having a pre-built animation would be impossible. 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.