From 8a534bb7955960da72fe9d00bfb8937c09bec7ed Mon Sep 17 00:00:00 2001 From: hiker Date: Fri, 8 Jun 2018 15:25:22 +1000 Subject: [PATCH] Fixed missing collisions. --- src/physics/btKart.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 src/physics/btKart.cpp diff --git a/src/physics/btKart.cpp b/src/physics/btKart.cpp old mode 100644 new mode 100755 index 7586cdf4a..95b812e35 --- a/src/physics/btKart.cpp +++ b/src/physics/btKart.cpp @@ -353,17 +353,17 @@ void btKart::getVisualContactPoint(float visual_rotation, m_visual_wheels_touch_ground = true; short int old_group = 0; + if (m_chassisBody->getBroadphaseHandle()) + { + old_group = m_chassisBody->getBroadphaseHandle() + ->m_collisionFilterGroup; + m_chassisBody->getBroadphaseHandle()->m_collisionFilterGroup = 0; + } for (int index = 2; index <= 3; index++) { // Map index 0-1 to wheel 2-3 (which are the rear wheels) btWheelInfo &wheel = m_wheelInfo[index]; updateWheelTransformsWS(wheel, false); - if (m_chassisBody->getBroadphaseHandle()) - { - old_group = m_chassisBody->getBroadphaseHandle() - ->m_collisionFilterGroup; - m_chassisBody->getBroadphaseHandle()->m_collisionFilterGroup = 0; - } btScalar max_susp_len = wheel.getSuspensionRestLength() + wheel.m_maxSuspensionTravel;