Garry's Mod Wiki

Trace

Description

Table structure used for util.TraceLine.

Parameters

start [Vector]

The start position of the trace

endpos [Vector]

The end position of the trace

filter [Entity]

Things the trace should not hit. Can also be a table of entities or a function with one argument:

  • Entity ent - The entity that the trace hit

Return true in the function to hit the entity, false to skip it.

Using a function here is super slow - try to avoid it.

mask [number]

The trace mask Enums/MASK. This determines what the trace should hit and what it shouldn't hit. A mask is a combination of Enums/CONTENTS - you can use these for more advanced masks.

collisiongroup [number]

The collision group Enums/COLLISION_GROUP. This determines what the trace should hit in regards to the entity's collision group.

ignoreworld [boolean]

Should the trace ignore world or not

output [table]

If set, the trace result will be written to the supplied table instead of returning a new table

Page Links


Special Pages


Wikis

?

Render Time: 37ms

Session 0
DB GetPage 4
Generate Html 14
SaveChanges 8
Render Body 0
Render Sidebar 9