- Home /
Drawing a glowing line from one point to another on update
What I'm looking to do is start drawing a line on mouse down and and stop drawing on mouse up. A straight line from the mouse down position to the current mouse position on update.
Oh, and it has to glow too!
I've looked and trail renderer, line renderer and dabbled a little with particles, but I'm not sure that the best method would be.
Answer by DaveA · Mar 26, 2011 at 09:44 PM
If you have Pro, the GL stuff draws lines, and there is Vectrocity in the Asset Store http://ippomed.com/wordpress/a-new-addon-for-unity3d-vectrosity
If you are talking Editor script, look at Gizmos.
Thanks! I got hold of Vectrocity, it's great! Any idea how I redraw the line every update?
$$anonymous$$aybe this: http://ippomed.com/wordpress/how-to-create-an-interactive-line-in-unity3d-with-vectrosity
Thanks Dave, I ended up doing this on update, the points3 overwrites the existing coordinate values...
function draw$$anonymous$$yLine() { myLine.points3[0] = linePoints[0]; myLine.points3[1] = linePoints[1]; Vector.DrawLine (myLine); }
Your answer
Follow this Question
Related Questions
how can i animate line between object 1 Answer
How can I leave a trail/tracks behind a character? Part 2 4 Answers
Draw a line in Game View? 5 Answers