fix for issue #1141

This commit is contained in:
sgold 2019-07-11 20:25:37 -07:00
parent b0d86f3480
commit 3523ab06d3

View File

@ -52,9 +52,7 @@ extern "C" {
btMotionState* motionState = reinterpret_cast<btMotionState*>(motionstatId);
btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
btVector3 localInertia = btVector3();
if(mass > 0){
shape->calculateLocalInertia(mass, localInertia);
}
shape->calculateLocalInertia(mass, localInertia);
btRigidBody* body = new btRigidBody(mass, motionState, shape, localInertia);
body->setUserPointer(NULL);
return reinterpret_cast<jlong>(body);