mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 12:53:03 +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: {
|
||||
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;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue