Is there any way to draw an arbitry line from x1,y1 to x2,y2?
I currently need a squaregrid so i am using a bunch of GUI.box, but I wondering if there is another more general way.
Cheers,
Grant
Is there any way to draw an arbitry line from x1,y1 to x2,y2?
I currently need a squaregrid so i am using a bunch of GUI.box, but I wondering if there is another more general way.
Cheers,
Grant
Yes, use a line renderer.
Its designed to draw between points of vector3, but you could translate it to screen co-ordinates and draw whatever shapes you like… it works like a chain of polylines.
I’ll try that thanks. Using GUI.Box did not work out. I was still wondering if there is a way to draw an arbitray line in the GUI layers.
Cheers,
Grant
I don’t believe you can do that (draw lines using the new GUI tools).
Tom’s right. If I’m not mistaken the lines drawn using the linerender will always be behind the GUI.
I would like a function similar that in Flash that allows you to draw a weighted bezier curve between two points. I don’t know if this could be done with some OpenGL trickery - one of the UT gfx guys would though.