How would I get a player to walk through a prop.

I’m trying to get a player to be capable of walking through ordinary prop_physics and other players (with no modifications to the prop itself, only the player) while still being capable of stopping traces and bullets.

By using ply:SetCollisionGroup(COLLISION_GROUP_DEBRIS) I’m able to make the player passable to other players, however, the affected player cannot pass through other players.

By using ply:GetPhysicsObject():EnableCollisions(false) I’m able to make the player passable to props, but once again the affected player cannot pass through props but is instead stopped by them and usually gets stuck on them. (I also have to redisable the collisions when the player ducks and unducks since a new phys object is assigned when these events happen apparently)

Anyone know how I can complete this by making the player simply move through props and other players while still maintaining normal player movement? Would the Move/SetupMove hooks help me out at all? I feel like a new MoveType is in order but have no idea how complex would this be to make.

http://wiki.garrysmod.com/?title=Constraint.NoCollide do a loop through all the prop_physics and apply it to the player.

Good idea, however I had it too and it turned out to yield the same problems mentioned above. The prop can pass through the player but the player cannot pass through the prop and usually gets stuck on it.

Well that and…

[lua]hook.Add(“ShouldCollide”,“PlayersPropsCollide”,function(e1,e2)
local c1,c2 = e1:GetClass(), e2:GetClass()
if (c1 == “player” and c2 == “prop_physics”) or (c2 == “player” and c1 == “prop_physics”) then
return true;
end
end[/lua]

**[Gamemode.ShouldCollide

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.ShouldCollide)**

I actually tired that and kept screwing things up, but I tried it again and things worked. This probably solves everything, thanks.

Entoros forgot a ‘)’ after the last end.

[lua]
hook.Add(“ShouldCollide”,“PlayersPropsCollide”,function(e1,e2)
local c1,c2 = e1:GetClass(), e2:GetClass()
if (c1 == “player” and c2 == “prop_physics”) or (c2 == “player” and c1 == “prop_physics”) then
return true;
end
end
[/lua]