fix for issue #1141

accellbaker
sgold 5 years ago
parent 02ccce08ec
commit 23ee02071e
  1. 4
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp

@ -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);

Loading…
Cancel
Save