No Collision with players?

How would you make an entity not collide with players, I did a ShouldCollide Hook, but if the entity is created inside the player, it will shove the player out.
Setting the entity to SOLID_NONE still allows collision at the origin.
Any ideas?

I’m just going to take a shot in the dark and say

[lua]hook.Add( “ShouldCollide”, “FuckPlayerCollision”, function( a, b )
if ( a:IsPlayer() && b:IsPlayer() ) then
return false;
end
end );[/lua]

I tried this, collision still happens at the origin for some reason

Have you tried Entity:SetCollisionGroup( number group )

You might be able to try “COLLISION_GROUP_WEAPON” and prevent players from colliding with each other.

[editline]15th March 2013[/editline]

Did a bit moar research and found http://wiki.garrysmod.com/page/Player/SetNoCollideWithTeammates
if you are not using more than one team

EDIT: Misread your first post :stuck_out_tongue: It will still work.

It’s not a player, its a spawned entity that should not collide with the player

player:SetAvoidPlayers(true)

It’s not a player, its’s a spawned entity that should not collide with the player

Then Pandaman09’s suggestion about entity:SetCollisionGroup(COLLISION_GROUP_WEAPON) should work fine.

There is still collision at the origin, forcing players upwards
It’s puzzling me, I can’t find a solution

Do you have of the other previously suggested methods still in use? i.e SetAvoidPlayers?

ent:SetEnableCollisionHooks(true) iirc

Not a function, but thanks

COLLSION_GROUP_WEAPON specifically DOES have player collision, that’s what it’s for.

Try COLLISION_GROUP_DEBRIS, but I use weapon collision and it works fine.

It is currently set to debris, still has collision at the origin though. Thanks for trying, I’ve tried everything you have said, and more. Seems that it’s not possible to remove collision at the origin.

maybe this?



        function ENT:Initialize()
	self.Entity:SetCollisionGroup( COLLISION_GROUP_WEAPON )
	self.Entity:SetNetworkedString("Owner", "World")
        end

Still origin collision ;-;

How are you trying to use this? What is the likelihood that they will pass through the origin?

You need to post your code. Post everything you have right now because there’s probably something wrong with it.

Even if there isn’t anything wrong with the code specifically, it generally makes it a lot easier for us to read the problem and figure out what you need.

Are you sure that your origin collision isn’t actually client prediction? iirc you need to have this on both server and client (shared) for it to function correctly.

Yes, I’m certain it is serverside, player can be boosted by the entities and fly into the air

The entity is created by other players, they occasionally use it to boost themselves places, or minge.