collisionWorld capsuleShape problem

snowcat
Posts: 9
Joined: Thu Jan 10, 2008 3:53 am

collisionWorld capsuleShape problem

Post by snowcat »

When using scaling with capsule shape, the getAabb() returned a wrong box. I checked btCapsuleShape.cpp code.
in function: btCapsuleShape::localGetSupportingVertexWithoutMargin

Code: Select all

		btVector3 pos(0,getHalfHeight(),0);
		vtx = pos +vec*m_localScaling*(radius) - vec * getMargin();
pos is from original height without scaling. I think maybe there are more errors than Aabb.
I guess current capsule shape with scaling may like this(the current):
Image