LineTrace

From Onset Developer Wiki
Revision as of 20:35, 30 August 2020 by BlueMountains (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
LineTrace

Type: Function
Context: Client
Introduced: v1.0

Description

Trace a line through the specified coordinates and return the HitType entity type, identifier and the impact coordinates.

Syntax

LineTrace(sX, sY, sZ, eX, eY, eZ [, complex])

Parameters

  • sX
    The start X axis
  • sY
    The start Y axis
  • sZ
    The start Z axis
  • eX
    The end X axis
  • eY
    The end Y axis
  • eZ
    The end Z axis
  • complex (optional)
    Whether to trace for complex collision, default: false.

Return Value

Example

local hittype, hitid, impactX, impactY, impactZ = LineTrace(startX, startY, startZ, endX, endY, endZ, false)

See also