LineTrace

From Onset Developer Wiki
Revision as of 05:17, 4 December 2019 by 28days (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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)
    __EDIT_ME__

Return Value

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

Example

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

See also

__EDIT_ME__