M
M
MishkaVNorky2019-02-27 15:15:34
C++ / C#
MishkaVNorky, 2019-02-27 15:15:34

Mesh, vertices, how to make a line ala Line Renderer?

Hello. For specific tasks, Line Renderer from the unit is not suitable, because.
You need to draw a line point by point + have a thickness.
I'm considering the option to make my own analogue, through the creation of a mesh.
When creating a mesh, I pass vertaxes (way points) and indices. Everything is drawing.
BUT the main question is how to make the thickness? Obviously it draws in 1 pixel.
That is, how to calculate the offset? if the point is in 3D space. MB through the shader to draw additionally (did not figure out how).
An option is to use MeshTopology.Quads but again, you need to transfer vertices already with a thickness indent

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question