Auto Collision Groups Changing

When two props (namely prop_vehicle_jeep, untested with others) collide repeatedly, one is automatically sent to COLLISION_GROUP_NONE, and they phase through eachother.

[LUA]
function GM:ShouldCollide(ent1, ent2)
return true
end
– Or
function GM:ShouldCollide(ent1, ent2)
if ent1:GetClass() == “prop_vehicle_jeep” and ent2:GetClass() == “prop_vehicle_jeep” then
ent1:SetCollisionGroup(COLLISION_GROUP_VEHICLE)
ent2:SetCollisionGroup(COLLISION_GROUP_VEHICLE)
end
return true
end
[/LUA]
Neither of the above has any effect. I also tried hooking instead of overriding, for what it’s worth. If I don’t change the collision group, and I print it in ShouldCollide, ent2’s changes to 1 (COLLISION_GROUP_NONE). If I change the collision group (even if it’s AFTER my print!) then printing always shows both collision groups as 7 (COLLISION_GROUP_VEHICLE), but the two still don’t collide.

After the FIRST time it runs on that entity, the collision group forever prints as 7 (because I set it to that). It never goes back to 1, but the entities still phase through eachother. So it’s not being reset to 1 each time (because I print BEFORE I change it in ShouldCollide), but that seems to be irrelevant.

Any tips?

Strange, is there anything else in the code setting the collision group to none?

Also I take it you are trying to make the 2 entities collide?

The collision between two vehicles ( where they go through each other ) is an internal engine fallback to prevent crashes if I recall correctly… Also, I wouldn’t recommend changing any collision groups in Should Collide, or if you do don’t repeatedly call it, call it once, cache it and don’t call for a while. Changing collision in ShouldCollide can be tricky and can cause physics to break!

Ah that’s too bad, car collisions are a decent sized part of what I’m trying to do. Certain there’s no way around it?