Drawing 3D lines as mesh in world

Hello all!

I know that there is a way to draw lines in the world, but it is not the good way for me (Debug.DrawLine (Vector3.zero, new Vector3 (1, 0, 0), Color.red); ) because it is only available in gizmo drawing mode.

I need the same thing, but as a mesh. I would like to use this line function in my fishing game.

Can you help me please?

Vectrosity.

–Eric

For basic stuff: LineRenderer

I tried lineRender, but it made a very very thick line for me.

Eric5h5-> I dont want to pay for it yet. because i learn the Unity too at the moment, i just would like to see a 3D line working in my project.

Thanks, I got this with line renderer:

One more question!:

How can i access line positions from code ? Add more point etc…

It’s all in the manual
You can set the width to 0.01 or something (it’s meters) and apply a black material

Thanks.
It’s ok, that i can set the position with SetPosition, but how can i get the actual position of the point*?*

up

Yes, thanks, when i set it’s position first time, i will save it’s position into a global variable. Thanks for everybody for answer. :slight_smile: