I must have missed something, has anyone else experienced this? I am not calling stepSimulation again between the broadphase result and running the Convex Sweep (Multiple times from different positions for the same object). I would prefer not to if at all possible, as I thought convex sweep was supposed to help circumvent the need for a full update.
Thanks in advance!
Code: Select all
btScalar SingleExclusionAllConvexResultCallback::addSingleResult( btCollisionWorld::LocalConvexResult& convexResult, bool normalInWorldSpace)
{
//caller already does the filter on the m_closestHitFraction
btAssert(convexResult.m_hitFraction <= m_closestHitFraction);
if (convexResult.m_hitCollisionObject != m_singleExclude)
{
m_closestHitFraction = convexResult.m_hitFraction;
AllConvexResultInformation info;
//Check if the hit normal is in world space
info.m_hitNormalWorld = normalInWorldSpace ? convexResult.m_hitNormalLocal :
convexResult.m_hitCollisionObject->getWorldTransform().getBasis() * convexResult.m_hitNormalLocal;
info.m_hitPointWorld = convexResult.m_hitPointLocal;
info.m_collisionObject = convexResult.m_hitCollisionObject;
info.m_localShapeInfo = convexResult.m_localShapeInfo;
m_hits.push_back(info);
}