Garry's Mod Wiki

Garry's Mod Wiki

  number, Vector, number util.DistanceToLine( Vector lineStart, Vector lineEnd, Vector pointPos )

Description

Gets the distance between a line and a point in 3d space.

Arguments

1 Vector lineStart
Start of the line.
2 Vector lineEnd
End of the line.
3 Vector pointPos
The position of the point.

Returns

1 number
Distance from line.
2 Vector
Nearest point on line.
3 number
Distance along line from start.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...