Quantcast
Viewing all articles
Browse latest Browse all 18

Answer by Goody!

A simple one is debug.drawline.

Below from: http://unity3d.com/support/documentation/ScriptReference/Debug.DrawLine.html


Debug.DrawLine
static function DrawLine (start : Vector3, end : Vector3, color : Color = Color.white) : void Description

Draws a line from the point start to end with color.

The line will be drawn in the scene view of the editor. If gizmo drawing is enabled in the game view, the line will also be drawn there.

// Draws a red line from the the world-space origin to the point (1, 0, 0)
function Update () {
Debug.DrawLine (Vector3.zero, new Vector3 (1, 0, 0), Color.red);
}


Btw, in case you didn't know, a vector3 is a point in space representing x,y,z.


Viewing all articles
Browse latest Browse all 18

Trending Articles