Structures/HullTrace

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (I fixed a small spelling error. "The 3D vector local to the start/endpos with the higest values" is now "The 3D vector local to the start/endpos with the highest values.)
Line 2: Line 2:
 
|Description=Table used by {{LibraryFunction|util|TraceHull}}.
 
|Description=Table used by {{LibraryFunction|util|TraceHull}}.
 
|Fields={{StructureField|Vector|start|The start position of the trace}}{{StructureField|Vector|endpos|The end position of the trace}}{{StructureField|Vector|maxs|The 3D vector local to the start/endpos with the highest values. This will represent the corner with the upper bounds of the box.}}{{StructureField|Vector|mins|The 3D vector local to the start/endpos with the lowest (often negative) values. This will represent the corner with the lower bounds of the box.}}{{StructureField|Entity|filter|Things the trace should not hit. Can also be a table of entities or a function with one argument:<br/>
 
|Fields={{StructureField|Vector|start|The start position of the trace}}{{StructureField|Vector|endpos|The end position of the trace}}{{StructureField|Vector|maxs|The 3D vector local to the start/endpos with the highest values. This will represent the corner with the upper bounds of the box.}}{{StructureField|Vector|mins|The 3D vector local to the start/endpos with the lowest (often negative) values. This will represent the corner with the lower bounds of the box.}}{{StructureField|Entity|filter|Things the trace should not hit. Can also be a table of entities or a function with one argument:<br/>
* {{FuncArg|Entity|ent|The entity that the trace hit}}|{}
+
* {{FuncArg|Entity|ent|The entity that the trace hit}}
 +
 
 +
Using a function here is super slow. Try to avoid it.|{}
 
}}{{StructureField|number|mask|The trace mask {{Enum|MASK}}. This determines what the trace should hit and what it shouldn't hit.|MASK_SOLID}}{{StructureField|boolean|ignoreworld|Should the trace ignore world or not.|false}}{{StructureField|table|output|If set, the trace result will be written to the supplied table instead of returning a new table|nil}}
 
}}{{StructureField|number|mask|The trace mask {{Enum|MASK}}. This determines what the trace should hit and what it shouldn't hit.|MASK_SOLID}}{{StructureField|boolean|ignoreworld|Should the trace ignore world or not.|false}}{{StructureField|table|output|If set, the trace result will be written to the supplied table instead of returning a new table|nil}}
 
}}
 
}}

Revision as of 18:22, 12 May 2016

Table used by util.TraceHull.



Type Name Description
Vector start

The start position of the trace

Vector endpos

The end position of the trace

Vector maxs

The 3D vector local to the start/endpos with the highest values. This will represent the corner with the upper bounds of the box.

Vector mins

The 3D vector local to the start/endpos with the lowest (often negative) values. This will represent the corner with the lower bounds of the box.

Entity filter

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

Using a function here is super slow. Try to avoid it.

Default: {}

number mask

The trace mask MASK_ Enums. This determines what the trace should hit and what it shouldn't hit.

Default: MASK_SOLID

boolean ignoreworld

Should the trace ignore world or not.

Default: false

table output

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

Default: nil

Personal tools
Navigation