Visualise the (interpolated) normal at the points where the wheels touch the ground.

This commit is contained in:
hiker 2015-04-14 09:33:55 +10:00
parent cdde932908
commit a4264cc063

View File

@ -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);