Skip to content

Commit

Permalink
server: physx: removed ToggleCollision switching hack
Browse files Browse the repository at this point in the history
  • Loading branch information
SNMetamorph committed Nov 12, 2023
1 parent 2b81882 commit dadf6be
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions server/physx/physx_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2623,9 +2623,7 @@ void CPhysicPhysX :: SweepEntity( CBaseEntity *pEntity, const Vector &start, con
// make a linear sweep through the world
// we need to disable collision here to avoid touching same actor as we trying to sweep
PxSweepBuffer sweepResult;
ToggleCollision(pRigidActor, false);
bool hitOccured = m_pScene->sweep(testBox, initialPose, vecDir, flLength, sweepResult, PxHitFlag::eNORMAL);
ToggleCollision(pRigidActor, true);

if (!hitOccured || sweepResult.getNbAnyHits() < 1)
return; // no intersection
Expand Down

0 comments on commit dadf6be

Please sign in to comment.