mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:17:43 +02:00
don't make shapes for joints with zero radius
This commit is contained in:
parent
bcb0cb2c3c
commit
05318acc7f
1 changed files with 6 additions and 1 deletions
|
@ -685,6 +685,9 @@ void SkeletonModel::buildShapes() {
|
||||||
// this shape is forced to be a sphere
|
// this shape is forced to be a sphere
|
||||||
type = Shape::SPHERE_SHAPE;
|
type = Shape::SPHERE_SHAPE;
|
||||||
}
|
}
|
||||||
|
if (radius < EPSILON) {
|
||||||
|
type = Shape::UNKNOWN_SHAPE;
|
||||||
|
}
|
||||||
Shape* shape = NULL;
|
Shape* shape = NULL;
|
||||||
int parentIndex = joint.parentIndex;
|
int parentIndex = joint.parentIndex;
|
||||||
if (type == Shape::SPHERE_SHAPE) {
|
if (type == Shape::SPHERE_SHAPE) {
|
||||||
|
@ -699,7 +702,9 @@ void SkeletonModel::buildShapes() {
|
||||||
}
|
}
|
||||||
if (parentIndex != -1) {
|
if (parentIndex != -1) {
|
||||||
// always disable collisions between joint and its parent
|
// always disable collisions between joint and its parent
|
||||||
disableCollisions(i, parentIndex);
|
if (shape) {
|
||||||
|
disableCollisions(i, parentIndex);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// give the base joint a very large mass since it doesn't actually move
|
// give the base joint a very large mass since it doesn't actually move
|
||||||
// in the local-frame simulation (it defines the origin)
|
// in the local-frame simulation (it defines the origin)
|
||||||
|
|
Loading…
Reference in a new issue