LineTrace: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|LineTrace(sX, sY, sZ, eX, eY, eZ [, complex])}} {{FuncParameters}} {{FuncParam|sX|__EDIT_ME__}} {{...")
 
No edit summary
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Trace a line through the specified coordinates and return the hittype entity type, identifier and the impact coordinates.}}


{{FuncSyntax|LineTrace(sX, sY, sZ, eX, eY, eZ [, complex])}}
{{FuncSyntax|LineTrace(sX, sY, sZ, eX, eY, eZ [, complex])}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|sX|__EDIT_ME__}}
{{FuncParam|sX|The start X axis}}
{{FuncParam|sY|__EDIT_ME__}}
{{FuncParam|sY|The start Y axis}}
{{FuncParam|sZ|__EDIT_ME__}}
{{FuncParam|sZ|The start Z axis}}
{{FuncParam|eX|__EDIT_ME__}}
{{FuncParam|eX|The end X axis}}
{{FuncParam|eY|__EDIT_ME__}}
{{FuncParam|eY|The end Y axis}}
{{FuncParam|eZ |__EDIT_ME__}}
{{FuncParam|eZ |The end Z axis}}
{{FuncParamOptional|complex|__EDIT_ME__}}
{{FuncParamOptional|complex|__EDIT_ME__}}


Line 17: Line 17:


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
local hittype, hitid, impactX, impactY, impactZ = LineTrace(startX, startY, startZ, endX, endY, endZ, false)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:ClientFunctions}}

Revision as of 15:44, 22 November 2019

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

  • __EDIT_ME__

Example

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

See also

Pak

Game

Colors

Miscellaneous

Time

Player

Camera

Waypoints

Fireworks

Packages

Chat

HUDs

Post-processing

GUI

Ocean

Mouse

Sky / Environment

Network

NPC

Objects

Events

Pickup

Door

Text3D

Sound

Text

Timer

Vehicles

Web UI

Key