Update soft_body.h

This commit is contained in:
Irlan 2019-05-04 15:56:47 -03:00
parent f567ac4738
commit b5edb9b1c7

View File

@ -210,10 +210,14 @@ public:
// Pressure force
b3Vec3 FP = Pn * A;
const float32 inv3 = 1.0f / 3.0f;
b3Vec3 f = inv3 * FP;
// Distribute
p1->ApplyForce(FP);
p2->ApplyForce(FP);
p3->ApplyForce(FP);
p1->ApplyForce(f);
p2->ApplyForce(f);
p3->ApplyForce(f);
}
}