From a4264cc063d2fe9bd1b3c80471571077bfe14d81 Mon Sep 17 00:00:00 2001 From: hiker Date: Tue, 14 Apr 2015 09:33:55 +1000 Subject: [PATCH] Visualise the (interpolated) normal at the points where the wheels touch the ground. --- src/physics/btKart.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/physics/btKart.cpp b/src/physics/btKart.cpp index 24d52bbfc..dc1904740 100644 --- a/src/physics/btKart.cpp +++ b/src/physics/btKart.cpp @@ -996,6 +996,10 @@ void btKart::debugDraw(btIDebugDraw* debugDrawer) debugDrawer->drawLine(wheelPosWS, getWheelInfo(v).m_raycastInfo.m_contactPointWS, wheelColor); + // Draw the (interpolated) normal of the ground at the wheel position + debugDrawer->drawLine(getWheelInfo(v).m_raycastInfo.m_contactPointWS, + getWheelInfo(v).m_raycastInfo.m_contactPointWS+getWheelInfo(v).m_raycastInfo.m_contactNormalWS, + btVector3(0, 0, 1)); } // for i < getNumWheels btVector3 yellow(1.0f, 1.0f, 0.0f);