Does anyone know why the size of the AABBs pulsate when the associated rigid body is rotating? For example, the size of the AABB for a capsule will oscillate when the capsule is just rolling on its side.
See also the following video of a kinematic body with just a cylinder collision shape: https://goo.gl/x1hsJH
And here is another with a compound collision shape: https://goo.gl/yw2PT4
Pulsating bounding boxes
-
- Posts: 849
- Joined: Tue Sep 30, 2014 6:03 pm
- Location: San Francisco
Re: Pulsating bounding boxes
It looks like the Aabb is actually the tight bounding box around a spinning local Obb. The implementation of btCylinderShape::getAabb() is as follows:
Yup. This is a very simple/fast way to implement it. Although the final box is sometimes larger than it needs to be, it is never too small, and it works for all rotations, not just rotations about the cylinder's axis of symmetry.
Code: Select all
void btCylinderShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
{
btTransformAabb(getHalfExtentsWithoutMargin(),getMargin(),t,aabbMin,aabbMax);
}