How can I make a trace ignore everything except the world?
8 replies, posted
That's about it.
Use the mask MASK_NPCWORLDSTATIC.
Set the filter to whatever 'ents.GetAll' returns..
[lua]trace.filter = ents.GetAll( );[/lua]
Filter supports a table?
Yes.
[QUOTE=Nevec;17040936]Set the filter to whatever 'ents.GetAll' returns..
[lua]trace.filter = ents.GetAll( );[/lua][/QUOTE]
ents.GetAll() includes the world entity, so it would probably ignore that too.
I would use the mask MASK_NPCWORLDSTATIC, as overv already suggested.
//EDIT:
Okay, ents.GetAll() works too, but I still prefer using a mask.
How do I use a mask?
Same as a filter, except..
[lua]trace.mask = MASK_NPCWORLDSTATIC;[/lua]
Thanks guys. Have some hearts.
Sorry, you need to Log In to post a reply to this thread.