Revision Difference
Structures/Trace#517088
<cat>struct</cat>
<structure>
<description>Table structure used for <page>util.TraceLine</page>.</description>
<fields>{{StructureField|Vector|start|The start position of the trace|Vector(0, 0, 0)</fields>⤶
⤶
</structure>⤶
⤶
{{StructureField|Vector|endpos|The end position of the trace|Vector(0, 0, 0)}}{{StructureField|Entity|filter|Things the trace should not hit. Can also be a table of entities or a function with one argument:⤶
<fields>⤶
<item name="start" type="Vector" default="Vector(0, 0, 0)">The start position of the trace</item>⤶
<item name="endpos" type="Vector" default="Vector(0, 0, 0)">The end position of the trace</item>⤶
{{StructureField|Entity|filter|Things the trace should not hit. Can also be a table of entities or a function with one argument:⤶
* <page>Entity</page> ent - The entity that the trace hit
Return true in the function to hit the entity, false to skip it.
<warning>Using a function here is super slow - try to avoid it.</warning>|{}
}}{{StructureField|number|mask|The trace mask <page>MASK</page>. This determines what the trace should hit and what it shouldn't hit. A mask is a combination of <page>CONTENTS</page> - you can use these for more advanced masks.|MASK_SOLID}}{{StructureField|number|collisiongroup|The collision group <page>COLLISION_GROUP</page>. This determines what the trace should hit in regards to the entity's collision group.|COLLISION_GROUP_NONE}}{{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}}⤶
}} </fields>⤶
⤶
</structure>⤶
⤶
<item name="mask" type="number" default="MASK_SOLID">The trace mask <page>MASK</page>. This determines what the trace should hit and what it shouldn't hit. A mask is a combination of <page>CONTENTS</page> - you can use these for more advanced masks.</item>⤶
<item name="collisiongroup" type="number" default="COLLISION_GROUP_NONE">The collision group <page>COLLISION_GROUP</page>. This determines what the trace should hit in regards to the entity's collision group.</item>⤶
<item name="ignoreworld" type="boolean" default="false">Should the trace ignore world or not</item>⤶
<item name="output" type="table" default="nil">If set, the trace result will be written to the supplied table instead of returning a new table</item>⤶
⤶
}}