Programmatically moving the bones of a skinned mesh for ragdoll

Started by
1 comment, last by Supercell 14 years, 12 months ago
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.
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 :)
------------------------------------------[New Delta Games] | [Sliders]
Thanks, that helps.

This topic is closed to new replies.

Advertisement