Skip to content

Format

typescript
Gizmos.DrawLine(p1, p2, depthTest)

class: Gizmos

Description

Draws a straight line from p1 to p2.

Parameters

param_nametypedescription
p1Vector3The starting coordinates.
p2Vector3The ending coordinates.
depthTestboolean?Whether to perform depth testing.

Return

typedescription
void

Code Example

typescript
OnUpdate(): void {

    let p1 = new Vector3(0,0,0);
    let p2 = new Vector3(5,5,5);
    Gizmos.DrawLine(p1,p2,false);
    
}