Collision shape and meshes

a_asvsfs
Posts: 6
Joined: Fri Jun 26, 2009 7:12 pm

Collision shape and meshes

Post by a_asvsfs »

hi,
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());
''mm'' is my final translation matrix to use in directx and ''rot'' for rotation
is there anything wrong?
a_asvsfs
Posts: 6
Joined: Fri Jun 26, 2009 7:12 pm

Re: Collision shape and meshes

Post by a_asvsfs »

Just edited my last post because someone didn't like that..
Last edited by a_asvsfs on Tue Jul 07, 2009 5:21 am, edited 1 time in total.
bone
Posts: 231
Joined: Tue Feb 20, 2007 4:56 pm

Re: Collision shape and meshes

Post by bone »

a_asvsfs wrote:ANYBODY THERE SOMEONE ANSWER ME PLS
First off, you might want to post your question to the correct forum: http://www.bulletphysics.com/Bullet/php ... um.php?f=9. Second, I would recommend being more polite and patient when you are asking for free support for a free library. My guess is that nobody's going to answer a demand in all caps. (And finally, no, I don't have the answer to your question).
a_asvsfs
Posts: 6
Joined: Fri Jun 26, 2009 7:12 pm

Re: Collision shape and meshes

Post by a_asvsfs »

THX FOR REPLY