mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-09 03:27:50 +02:00
Fix volume formula for capsules
This commit is contained in:
parent
83490051d9
commit
b340cd06bf
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ float ShapeInfo::computeVolume() const {
|
||||||
}
|
}
|
||||||
case SHAPE_TYPE_CAPSULE_Y: {
|
case SHAPE_TYPE_CAPSULE_Y: {
|
||||||
float radius = _halfExtents.x;
|
float radius = _halfExtents.x;
|
||||||
volume = PI * radius * radius * (2.0f * _halfExtents.y + 4.0f * radius / 3.0f);
|
volume = PI * radius * radius * (2.0f * (_halfExtents.y - _halfExtents.x) + 4.0f * radius / 3.0f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue