mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
Merge pull request #1361 from Azaezel/BulletBreak1
adds minimum displacement check prior to convexSweepTest to avoid NaNs
This commit is contained in:
commit
4721181d44
1 changed files with 3 additions and 2 deletions
|
|
@ -291,7 +291,8 @@ bool BtPlayer::_sweep( btVector3 *inOutCurrPos, const btVector3 &disp, Collision
|
||||||
callback.m_collisionFilterGroup = mGhostObject->getBroadphaseHandle()->m_collisionFilterGroup;
|
callback.m_collisionFilterGroup = mGhostObject->getBroadphaseHandle()->m_collisionFilterGroup;
|
||||||
callback.m_collisionFilterMask = mGhostObject->getBroadphaseHandle()->m_collisionFilterMask;
|
callback.m_collisionFilterMask = mGhostObject->getBroadphaseHandle()->m_collisionFilterMask;
|
||||||
|
|
||||||
mGhostObject->convexSweepTest( mColShape, start, end, callback, 0.0f );
|
if (disp.length()>0.0001)
|
||||||
|
mGhostObject->convexSweepTest( mColShape, start, end, callback, 0.0f );
|
||||||
|
|
||||||
inOutCurrPos->setInterpolate3( start.getOrigin(), end.getOrigin(), callback.m_closestHitFraction );
|
inOutCurrPos->setInterpolate3( start.getOrigin(), end.getOrigin(), callback.m_closestHitFraction );
|
||||||
if ( callback.hasHit() )
|
if ( callback.hasHit() )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue