1
General Anim8or Forum / Re: New converter to export to Collada (including animations!)
« on: November 12, 2023, 03:15:29 pm »
In the past i made simple 3D engine base on DX9 and i used an8 file format as my main format for it, im not sure if it will help but i had similar problem and to solve that i had to calculate Quaternion in different order...
Base on my old source code right order is Y * Z * X
Code: [Select]
For I := 0 To High(SequenceArray[LastSequence].FrameArray) Do
Begin
//MAKE QUATERNION FROM AXIS (Y-Z-X ORDER)
QRotationY(Qy,SequenceArray[LastSequence].FrameArray[I].Bones[J].y*(Pi/180));
QRotationZ(Qz,SequenceArray[LastSequence].FrameArray[I].Bones[J].z*(Pi/180));
QRotationX(Qx,SequenceArray[LastSequence].FrameArray[I].Bones[J].x*(Pi/180));
D3DXQuaternionMultiply(Qy,Qy,Qz);
D3DXQuaternionMultiply(Qy,Qy,Qx);
D3DXQuaternionNormalize(SequenceArray[LastSequence].FrameArray[I].Bones[J],Qy);
End;
Base on my old source code right order is Y * Z * X