⭐trace
Engine Trace Library, loaded by requiring "gamesense/trace"
Functions
trace.line
trace.line(from: vector, to: vector[, options: table])
: table (trace info)
Returns a table, structured as Trace
trace.hull
trace.hull(from: vector, to: vector, mins: vector, maxs: vector[, options: table])
: table (trace info)
Returns a table, structured as Trace
Trace
Description
This is simply the structure of the output table.
plane is a table that consists of values, indexed as normal, dist, type and sign_bits.
surface is a table that consists of values, indexed as name, props and flags.
Values
Mask
Description
Mask is an optional value in the "options" table.
The default mask is MASK_PLAYERSOLID.
You can pass either a string, a number or a table with strings or numbers.
If it's a table, all the masks will be combined by using the bitwise OR.
These enumerations are simply combinations of Contents which you can use just like the masks.
Values
Skip
Description
Skip is an optional value in the "options" table.
It can be either an entindex, a table with entindices or a function, like a "reverse" ShouldHitEntity callback.
If you're using it as a callback, entindex and contents_mask can be accessed by adding them to the arguments of a function.
Type
Description
Type is an optional value in the "options" table, indexed by "type".
The default trace type is TRACE_EVERYTHING.
You can pass either a string or a number.
Values
Contents
Description
This is what masks are combined with, meaning it can be used the same way.
This is mostly for rebuilding stuff when Valve doesn't use the masks that already exist.
Values
Examples
Plane visualizer
A demonstration how you can create a crosshair used in many other cheat providers, if you ever found it cool-looking of course.
I'm not entirely good at math so I'm sure there's a better way to make it!
Skip & mask capabilities
This example shows what skip & mask values are capable of.
Last updated