Tweaked water physics

This commit is contained in:
2025-09-04 01:14:10 +03:00
parent 1c56387c35
commit 25816c5658
4 changed files with 37 additions and 13 deletions

View File

@@ -300,21 +300,27 @@ WaterModule::WaterModule(flecs::world &ecs)
int i;
if (!body.mWaterBody) {
btCompoundShape *shape = new btCompoundShape;
btBoxShape *boxShape0 = new btBoxShape(
btVector3(1000, 10, 1000));
btBoxShape *boxShape1 = new btBoxShape(
btVector3(1000, 20, 1000));
btBoxShape *boxShape2 = new btBoxShape(
btVector3(1000, 100, 1000));
btBoxShape *boxShape3 = new btBoxShape(
btVector3(1000, 1000, 1000));
btTransform boxShapeXform0(btQuaternion(),
btVector3(0, -10.2f,
0));
btTransform boxShapeXform1(btQuaternion(),
btVector3(0, -20.2f,
btVector3(0, -30.2f,
0));
btTransform boxShapeXform2(btQuaternion(),
btVector3(0, -120.2f,
btVector3(0, -130.2f,
0));
btTransform boxShapeXform3(
btQuaternion(),
btVector3(0, -1120.2f, 0));
shape->addChildShape(boxShapeXform0, boxShape0);
shape->addChildShape(boxShapeXform1, boxShape1);
shape->addChildShape(boxShapeXform2, boxShape2);
shape->addChildShape(boxShapeXform3, boxShape3);