im a beginner in Bullet
im using bullet with directx and have some problem with collision shape i dont know how to match collision shape size with my meshes size for example i have a boxshape collision for predefined mesh like teapot ...
second question is about integrating with directx ,im using motion state for translation and for rotation like following code(for test)
Code: Select all
body1->getMotionState()->getWorldTransform(mytrans);
btQuaternion qua;
D3DXQUATERNION qIn;
D3DXMATRIX rot;
mytrans.getBasis().getRotation(qua);
qIn.x=qua.getX();
qIn.y=qua.getY();
qIn.z=qua.getZ();
qIn.w=qua.getW();
//rotation matrix
D3DXMatrixRotationQuaternion(&rot,&qIn);
D3DXMATRIX mm;
//translation matrix
D3DXMatrixTranslation(&mm,mytrans.getOrigin().getX(),mytrans.getOrigin().getY(),mytrans.getOrigin().getZ());
is there anything wrong?