LineTrace: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
{{FuncParamOptional|complex|__EDIT_ME__}} | {{FuncParamOptional|complex|__EDIT_ME__}} | ||
{{FuncReturnValue|Hit type, Hit id, impact X, Y and Z | {{FuncReturnValue|Hit type, Hit id, impact X, Y, Z and impact normals X, Y, Z.}} | ||
== Example == | == Example == |
Revision as of 12:24, 7 December 2019
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, Z and impact normals X, Y, Z.
Example
local hittype, hitid, impactX, impactY, impactZ = LineTrace(startX, startY, startZ, endX, endY, endZ, false)
See also
__EDIT_ME__