Difference between revisions of "LineTrace"

From Onset Developer Wiki
Line 22: Line 22:

Revision as of 07:17, 4 December 2019


Type: Function
Context: Client
Introduced: v1.0


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


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


  • 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)

Return Value

  • Hit type, Hit id, impact X, Y and Z axis.


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

See also