Collision

Every now and then on my server the majority of entities (players, vehicles, etc) stop colliding all together. They just clip right through eachother. I have no custom collision checks. Does anyone know why this might be?

Maybe too many entities? Do you have any custom physics related functions or hooks/

I doubt it’s too many entities. It happens at pretty random times, even when I’m testing and there’s only two of us driving our 2 cars around.

I’ve got this hook for PhysgunDrop (admins can carry cars), but the issue isn’t related to physgunning at all near as I can tell. It just pops up. It seems to be when a lot of collisions are happening, but not always.



function PhysgunDrop(ply, ent)
    if ent:IsValid() and ent:IsPlayer() then
        ent.StopFallDamage = true
		ent.Physgunned = false
		ent:SetMoveType(MOVETYPE_WALK)
        timer.Simple(1.5, function()
            ent.StopFallDamage = false
        end)
        ply.PhysgunTarget = nil
    elseif ent:IsValid() and ent:GetClass() == "prop_vehicle_jeep" then
		ent:SetCollisionGroup(COLLISION_GROUP_VEHICLE)
	elseif ent:IsValid() and ent:GetClass() == "prop_dynamic" then
		ent:SetCollisionGroup(COLLISION_GROUP_NONE)
	end
end


Check your ShouldCollide hooks. If they’re not handled properly it can lead to physics freaking the fuck out and bouncing through the world.

This happens to me as well, except on Deathrun. Mapchanges do not fix this issue either, it requires a complete restart. Almost as if it’s some kind of issue down past the engine level?

I haven’t got any.

I seem to recall last time I researched this probably some months ago (without finding a solution), I came across something that claimed it was an engine fallback to prevent crashing when collisions overwhelmed the server.

Still though, it doesn’t happen to most people so something must be causing it for us…

Anyone got anything helpful for this? Pretty detrimental to a car based RP when cars don’t collide.

honestly got no clue either, I set TCAdmin to restart my server at 6AM in the morning when nobody is online to either reduce the chances of the collisions breaking during the day or to fix the collisions broken from the day before.

Mine doesn’t seem to be quite so catastrophic. Usually after just a couple minutes collisions start again.