Merge pull request #511 from empirephoenix/master

Finally fixing this
This commit is contained in:
empirephoenix 2016-06-22 16:18:57 +02:00 committed by GitHub
commit e2b6c51730

View File

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