What type of line is that?

I have been trying to draw a line that looks like that. I have tried everything. Can someone tell me what type of line would do that? is it a texture or sprite or something?

Unity 5 2d

2199046--145995--upload_2015-7-10_20-26-36.png

Check out: Unity - Scripting API: LineRenderer

Can the line render do rounded edges?

I have tried line renender for hours, It does not work well. I was about to buy Vectrosity and try that.

2199046--145995--upload_2015-7-10_20-26-36.png

A LineRenderer won’t work for that because of the rounded ends. You need to build it in sections with the appropriate UV mapping using a mesh or UIVertices. Or, yes, just buy Vectrosity if you don’t want to fiddle around with that stuff, since it will do exactly that. :wink:

–Eric

Wait, are you the guy who wrote Vectrosity? If you say it will do it I will click buy right now!

Wait, are you the guy who wrote Vectrosity? If you say it will do it I will click buy right now!

He said it! :wink:

Indeed, I am that guy. And sluice is correct: I said it. :wink: Quick screenshot…you can of course set color/transparency/etc. as desired:

2199067--145999--Screen Shot 2015-07-10 at 9.41.23 PM.png

–Eric

Bought. Going to learn it . Thank you !!!

Thank you; let me know if you have any questions. :slight_smile:

–Eric

berry smooth :wink:

What am I doing wrong?

I imported only Vectrosity4 (using unity 5);
imported the name space with (C#)
using Vectrosity;

and i get the screen shot below.

2199131--146002--Screen Shot 2015-07-10 at 9.48.06 PM.png

I clicked around and found it. After unity imported it, I still had to go to Assest->Import Package-> Custom and choose the Vectrosity4 Folder.

You can just double-click on the Vectrosity4 package.

–Eric

Can you send me your texture file for the rounded corners. I am not understanding how a textfile works and need an example.

It’s from the EndCap demo, so you already have it.

–Eric

I can not get endcap.mirror to work. Can someone see what I am doing wrong.

publicclassDrawingLines : MonoBehaviour {
Vector3[ ] linePoints = newVector3[10];
Vector LinemyLine;

public MaterialmyMat;
public Texture2Dtexture;

public GameObjecta1;
public GameObjecta2;

voidStart () {
VectorLine.SetEndCap (“RoundedEnd”, EndCap.Mirror,myMat,texture);
linePoints [0] = a1.transform.position;
linePoints [1] = a2.transform.position;

myLine = newVectorLine(“myLine”, linePoints, myMat, 5.0f,LineType.Discrete);
myLine.lineWidth = 20f;
myLine.endCap = “RoundedEnd”;
myLine.Draw ();
}

I get this.
2199733--146058--upload_2015-7-11_11-59-22.png

You’re only using the first two points in the Vector3 array, but you defined it to have 10 points. Since you’re only using two points, the array should have only two entries. (Also, please use code tags when posting code.)

–Eric

Is it possible to do no fill? I dont see that in the documentation? like a hollow outline?

Probably the easiest way to do that is to use a shader, though you could make the outline itself with Vectrosity (so you wouldn’t actually use textures or end caps in that case).

–Eric