I tweaked the BasicDemo.cpp to demonstrate - changing the boxes to capsules and setting the scaling in stead of multiplying the capsule's parameters by the SCALING factor. See line 140 of BasicDemo.cpp.
Code: Select all
//btCollisionShape* colShape = new btCapsuleShape(SCALING*.75, SCALING*1);
btCollisionShape* colShape = new btCapsuleShape(.75, 1);
colShape->setLocalScaling(btVector3(SCALING, SCALING, SCALING));
Code: Select all
btCollisionShape* colShape = new btCapsuleShape(SCALING*.75, SCALING*1);
//btCollisionShape* colShape = new btCapsuleShape(.75, 1);
//colShape->setLocalScaling(btVector3(SCALING, SCALING, SCALING));
Another thing I noticed while testing this out, if I apply the scaling this way using cylinders:
Code: Select all
btCollisionShape* colShape = new btCylinderShape(btVector3(1,1,1));
colShape->setLocalScaling(btVector3(SCALING, SCALING, SCALING));
Code: Select all
btCollisionShape* colShape = new btCylinderShape(btVector3(SCALING*1,SCALING*1,SCALING*1));
Thanks in advance for the help! Cheers!
- Chuck