render.DrawLine

From Garry's Mod
Jump to: navigation, search
 render.DrawLine( )

Contents

Description

Draws a line in 3D space.

NOTE

This is a rendering function that requires a 3D rendering context.
This means that it will only work in hooks with a 3D rendering context.

Arguments

Vector startPos

Line start position in world coordinates.

Arguments

Vector endPos

Line end position in world coordinates.

Arguments

table color=Color( 255, 255, 255 )

The color to be used. Uses the Color structure.

Arguments

boolean writeZ=false

Whether or not to consider the Z buffer. If false, the line will be drawn over everything currently drawn, if true, the line will be drawn with depth considered, as if it were a regular object in 3D space.

BUG

Enabling this option will cause the line to ignore the color's alpha.

Issue Tracker: #1086

Personal tools
Navigation