Trace
Tip
Trace is not instantiable and should be used directly like Trace:LineSingle(...)
Functions#
LineSingle#
Performs a raycast between two points and returns the first blocking hit (if any).
local hit = Trace:LineSingle(start, endPos)
LineMulti#
Performs a raycast between two points and returns all hit results (blocking and overlapping).
local results = Trace:LineMulti(start, endPos)
SphereSingle#
Casts a sphere from start to end and returns the first blocking hit.
local hit = Trace:SphereSingle(start, endPos, 32)
SphereMulti#
Casts a sphere from start to end and returns all hit results.
local results = Trace:SphereMulti(start, endPos, 32)
BoxSingle#
Performs a box sweep and returns the first hit.
local hit = Trace:BoxSingle(start, endPos, Vector(10, 10, 10), Rotator(0, 0, 0))
BoxMulti#
Performs a box sweep and returns all hits.
local results = Trace:BoxMulti(start, endPos, Vector(10, 10, 10), Rotator(0, 0, 0))
CapsuleSingle#
Sweeps a capsule shape and returns the first hit.
local hit = Trace:CapsuleSingle(start, endPos, 20, 50)
CapsuleMulti#
Sweeps a capsule shape and returns all hits.
local results = Trace:CapsuleMulti(start, endPos, 20, 50)