PhysicsCollide() is called by invalid colliders


Entity:AddCallback, I can get

ENT:PhysicsCollide to work on “prop_ragdoll”. The problem is that no matter what I try, it gets called randomly and no method thus far proves to check if the collider is valid. I am also getting some mixed statements, sometimes saying that the collider is a Physics Object and other times saying it’s an entity.

Approaches thus far:

This makes nothing happen when we touch the world.

PhysObj:GetEntity and

Entity:IsWorld together
Since the collider can be null,

PhysObj:GetEntity makes errors, saying it’s trying to index a null entity. Lol.

This makes nothing happen when we touch the world. Also indexing a null entity.

Here are some things I found that might help, but I don’t know how to use.



[editline]2nd October 2017[/editline]

Oh, and it isn’t triggering itself, I tried checking for that already.

[editline]2nd October 2017[/editline]

Couldn’t get an answer, found it out myself.

Remember kids,

if !IsValid(collider) then return end

This doesn’t work for shit. /\

For some reason, this does. /

if IsValid(collider) then
     -- do stuff