• Advertisement
Sign in to follow this  

Programmatically moving the bones of a skinned mesh for ragdoll

This topic is 3230 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've successfully integrated the hardware skinning code from the DirectX SDK into my project. Keyframe animation works fine, now I would like to know how to move individual bones programmatically, specifically to create a ragdoll, I already know how to do the physics. If anyone can give me some ideas how to do this I would appreciate it, thanks.

Share this post


Link to post
Share on other sites
Advertisement
When you create/load the skinned mesh, you should also be storing a set of pointers to the D3DXFrame objects. These frames store the transformation matrix for each bone in the skeleton, so you have to update these when you want to update the ragdoll.

Where you have these pointers to the frames is entirely dependant on how you implemented the skinned mesh loading. If you used the D3DXLoadMeshHierarchyFromX function, then the frame pointer that was output is your rootFrame, and all other frames in the skeleton will be easily accessible from there. If you used some form of X file parser, then only you know where your bones are :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement