- Home /
linerender dot
I need a dotted line that can be animated (lengthened and shortened). The line is a child of another object, and must follow the movements. Linerender works, but I have problem with the shader. The UV form factor is calculate on the entire length of the object. So if i modify the length of line the result is a stretched dot line. There is a way to make shader with fixed tile UV based on texture size (or similar)? Another way to make resizable dot line are welcome... Somebody can help?
Answer by Patel-Sagar · Oct 02, 2014 at 09:55 AM
but can you increase number of points instead of increasing its length?. That way it will not get stretched.
The endpoint of my line follow an object. I try to write something (or find something just writing).
Answer by robertbu · Oct 02, 2014 at 03:29 PM
Dynamically change the Material.mainTextureScale based on the length of the line. This will cause the dots to tile. It is easiest to do the calculations if you author your texture for a line length of 1.0, and then scale the texture for other lengths.
Your answer
Follow this Question
Related Questions
[Mac Build] changes path letters following dot to underscore 0 Answers
Unwanted 2nd empty gameobject 1 Answer
Drawing a GUIBox on player/enemies in MiniMap 0 Answers
Height lines on terrain 0 Answers