DrChat / Gmod-vphysics

Replacement vphysics module for the Source engine (originally meant for Garry's Mod)
Other
92 stars 15 forks source link

RecheckCollisionFilter should delete any manifolds that are now between objects that can't collide #14

Closed DrChat closed 10 years ago

DrChat commented 10 years ago

Should "fix" nocollide stool and possibly other things. Manifolds between objects exist as long as their AABBs overlap, and they contain all of the collision points between the objects. CCollisionSolver is ONLY queried when creating manifolds, not new contact points!

However, the fix is not easy. Collision algorithms like to hold on to their manifolds and try to release manifolds that are no longer being tracked by the dispatcher.

Workaround is to separate their objects so their AABBs no longer overlap for the changes to take effect.

Undoing nocollide is broken however, the game's collision solver returns false. Apparently the game never removes the object pair from CPhysicsObjectPairHash? Confirmed to be broken in normal vphysics too.

DrChat commented 10 years ago

Fixed in b1b8b7337450bcdc4ba475a84178b1a1b072181b.