Fix src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
See Issue 643, thanks to Laurent at liquiddragon for the patch. Fix warning, See Issue 655
This commit is contained in:
@@ -615,7 +615,7 @@ void btAxisSweep3Internal<BP_FP_INT_TYPE>::removeHandle(BP_FP_INT_TYPE handle,bt
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename BP_FP_INT_TYPE>
|
template <typename BP_FP_INT_TYPE>
|
||||||
void btAxisSweep3Internal<BP_FP_INT_TYPE>::resetPool(btDispatcher* dispatcher)
|
void btAxisSweep3Internal<BP_FP_INT_TYPE>::resetPool(btDispatcher* /*dispatcher*/)
|
||||||
{
|
{
|
||||||
if (m_numHandles == 0)
|
if (m_numHandles == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ bool btSphereBoxCollisionAlgorithm::getSphereDistance(const btCollisionObjectWra
|
|||||||
btScalar distance;
|
btScalar distance;
|
||||||
|
|
||||||
//special case if the sphere center is inside the box
|
//special case if the sphere center is inside the box
|
||||||
if (dist2 == 0.0f)
|
if (dist2 <= SIMD_EPSILON)
|
||||||
{
|
{
|
||||||
distance = -getSpherePenetration(boxHalfExtent, sphereRelPos, closestPoint, normal);
|
distance = -getSpherePenetration(boxHalfExtent, sphereRelPos, closestPoint, normal);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user