From 4faf6cf36cac202ae9569d99545fdbfc2a4712f6 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Wed, 4 May 2016 13:50:47 -0400 Subject: [PATCH] Merge pull request #491 from riccardobl/AddGimpactCollisionAlgo Fix GImpact passing through other shapes. --- jme3-bullet-native/src/native/cpp/jmePhysicsSpace.cpp | 2 ++ jme3-bullet-native/src/native/cpp/jmePhysicsSpace.h | 1 + 2 files changed, 3 insertions(+) diff --git a/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.cpp b/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.cpp index 8cb80bc87..6a9e248de 100644 --- a/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.cpp +++ b/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.cpp @@ -147,6 +147,8 @@ void jmePhysicsSpace::createPhysicsSpace(jfloat minX, jfloat minY, jfloat minZ, } else { dispatcher = new btCollisionDispatcher(collisionConfiguration); } + btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher); + // the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded) if (threading) { diff --git a/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.h b/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.h index 2e2b3865c..f3e3e2503 100644 --- a/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.h +++ b/jme3-bullet-native/src/native/cpp/jmePhysicsSpace.h @@ -48,6 +48,7 @@ #include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h" #include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h" #include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h" +#include "BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h" /** * Author: Normen Hansen