Format
typescript
Gizmos.DrawLineWithColor(p1, p1_color, p2, p2_color, depthTest)class: Gizmos
Description
Draws a colored straight line from p1 to p2.
Parameters
| param_name | type | description |
|---|---|---|
| p1 | Vector3 | Starting coordinates |
| p1_color | Color | Color of the starting coordinates |
| p2 | Vector3 | Ending coordinates |
| p2_color | Color | Color of the ending coordinates |
| depthTest | boolean? | Whether to perform depth testing |
Return
| type | description |
|---|---|
void |
Code Example
typescript
OnUpdate(): void {
let p1 = new Vector3(0,0,0);
let p1_color = Color.red;
let p2 = new Vector3(5,5,5);
let p2_color = Color.green;
Gizmos.DrawLineWithColor(p1,p1_color,p2,p2_color,false);
}