I've just spent some time debugging a bullet problem - when falling down on one particular spot the kart would be shot up high into the sky. Reason is that m_hitNormalInWorld in btVehicleRaycasterResult is not normalised. While I knew that this value is not normalised (I normalise it in my code when using it), the problem is that this value is actually used without normalisation in btRaycastVehicle:
Code: Select all
wheel.m_raycastInfo.m_contactNormalWS = rayResults.m_hitNormalInWorld; ... btVector3 impulse = wheel.m_raycastInfo.m_contactNormalWS * suspensionForce * step;
Now we have used the code without normalisation for years now, and never noticed a problem - were we just lucky (in that we apparently never fell onto a big triangle)? Or are we perhaps introducing some kind of problem with the normalisation?