diff --git a/prog/engine/phys/physBullet/bulletRayCar.cpp b/prog/engine/phys/physBullet/bulletRayCar.cpp index 38a967f34..6a23d3adc 100644 --- a/prog/engine/phys/physBullet/bulletRayCar.cpp +++ b/prog/engine/phys/physBullet/bulletRayCar.cpp @@ -5,6 +5,9 @@ #include #include #include +#if BT_BULLET_VERSION >= 325 +#include +#endif #define U_EPSILON 1e-6 const btVector3 gravity(0, -9.8, 0); @@ -83,6 +86,9 @@ void BulletRbRayCar::Wheel::addRayQuery(float ifps) btVector3 p0 = spring_fixpt, p1 = spring_fixpt + wSpringAxis * hit.distance; RayCastCallback resultCallback(p0, p1, body, wheel); +#if BT_BULLET_VERSION >= 325 + resultCallback.m_flags |= btTriangleRaycastCallback::kF_UseGjkConvexCastRaytest; +#endif physWorld->getScene()->rayTest(p0, p1, resultCallback); if (resultCallback.hasHit()) {