Mapping Ragdoll to Model (DirectX and .X file + PhysX)

892 Views Asked by At

I'm trying to create ragdolls using an engine delivered by my teachers. We use DirectX 10, the .X format as mesh file (using assimp and a closed parser designed by the teachers) and Nvidia PhysX.

I've got working animations (mesh deforms oke) and I now I have to create a ragdoll figure in PhysX (references are the Nvidia Lessons). But I'm having issues binding my PhysX ragdoll to my Mesh so when I am in "Seed Mode" my ragdoll follows the animation.

I'm having issues with the positioning the PhysX actors (offset + orientation) and with the animation itself (x-axis rotations works fine, but z and y-axis don't). Maybe there is an issue with the coordinate system, but I'm staring blind at this issue. I hope someone could spot some mistakes with my code or point me in the right direction.

Here is the PhysX bone code that, normally, need to position the PhysX actor to the Mesh Bone: http://pastebin.com/QT8sxuUp

As a notice, the offsets and the transformationMatrices I get directly from the .x file (using the teachers parser offcourse) I also exported the mesh using a LH coordinate system.

This is the result on my screen: Image 1 Image 2

1

There are 1 best solutions below

0
TheGoozah On

The issue is resolved. The problem was located, as suspected, within the converter. The offset values where wrong.