mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
try out smaller collision margins
This commit is contained in:
parent
80749195e6
commit
2ec660bd42
1 changed files with 3 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
|||
#include "ShapeInfoUtil.h"
|
||||
#include "BulletUtil.h"
|
||||
|
||||
const float BULLET_COLLISION_MARGIN = 0.01;
|
||||
|
||||
btCollisionShape* ShapeInfoUtil::createShapeFromInfo(const ShapeInfo& info) {
|
||||
btCollisionShape* shape = NULL;
|
||||
|
@ -44,6 +45,7 @@ btCollisionShape* ShapeInfoUtil::createShapeFromInfo(const ShapeInfo& info) {
|
|||
btVector3 btPoint(point[0], point[1], point[2]);
|
||||
hull->addPoint(btPoint, false);
|
||||
}
|
||||
hull->setMargin(BULLET_COLLISION_MARGIN);
|
||||
hull->recalcLocalAabb();
|
||||
shape = hull;
|
||||
} else {
|
||||
|
@ -60,6 +62,7 @@ btCollisionShape* ShapeInfoUtil::createShapeFromInfo(const ShapeInfo& info) {
|
|||
hull->recalcLocalAabb();
|
||||
compound->addChildShape (trans, hull);
|
||||
}
|
||||
compound->setMargin(BULLET_COLLISION_MARGIN);
|
||||
shape = compound;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue