Applied patch for character controller by bjorn.wesen. Fixes Issue 644.
Fixed some warnings in double-precision compile
This commit is contained in:
@@ -160,7 +160,21 @@ btPairCachingGhostObject* btKinematicCharacterController::getGhostObject()
|
||||
|
||||
bool btKinematicCharacterController::recoverFromPenetration ( btCollisionWorld* collisionWorld)
|
||||
{
|
||||
// Here we must refresh the overlapping paircache as the penetrating movement itself or the
|
||||
// previous recovery iteration might have used setWorldTransform and pushed us into an object
|
||||
// that is not in the previous cache contents from the last timestep, as will happen if we
|
||||
// are pushed into a new AABB overlap. Unhandled this means the next convex sweep gets stuck.
|
||||
//
|
||||
// Do this by calling the broadphase's setAabb with the moved AABB, this will update the broadphase
|
||||
// paircache and the ghostobject's internal paircache at the same time. /BW
|
||||
|
||||
btVector3 minAabb, maxAabb;
|
||||
m_convexShape->getAabb(m_ghostObject->getWorldTransform(), minAabb,maxAabb);
|
||||
collisionWorld->getBroadphase()->setAabb(m_ghostObject->getBroadphaseHandle(),
|
||||
minAabb,
|
||||
maxAabb,
|
||||
collisionWorld->getDispatcher());
|
||||
|
||||
bool penetration = false;
|
||||
|
||||
collisionWorld->getDispatcher()->dispatchAllCollisionPairs(m_ghostObject->getOverlappingPairCache(), collisionWorld->getDispatchInfo(), collisionWorld->getDispatcher());
|
||||
|
||||
@@ -90,10 +90,10 @@ SIMD_FORCE_INLINE const char* btGeneric6DofSpringConstraint::serialize(void* dat
|
||||
int i;
|
||||
for (i=0;i<6;i++)
|
||||
{
|
||||
dof->m_equilibriumPoint[i] = m_equilibriumPoint[i];
|
||||
dof->m_springDamping[i] = m_springDamping[i];
|
||||
dof->m_equilibriumPoint[i] = (float)m_equilibriumPoint[i];
|
||||
dof->m_springDamping[i] = (float)m_springDamping[i];
|
||||
dof->m_springEnabled[i] = m_springEnabled[i]? 1 : 0;
|
||||
dof->m_springStiffness[i] = m_springStiffness[i];
|
||||
dof->m_springStiffness[i] = (float)m_springStiffness[i];
|
||||
}
|
||||
return "btGeneric6DofSpringConstraintData";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user