- Home /
How to diappear a line renderer from start and end position of line
To a object i attached a line renderer.
Object moves from through some points. it makes line.
All points are given as set positions of line renderer.
Line have to disapper slowly from from both sides
From end position it will disapperar using code
linerenderer.SetVertexCount(curNo);
But how to make disappear fron starting position
Answer by HenryStrattonFW · Jun 20, 2013 at 07:23 PM
You could grab the vertex positions, shift them all down one position (or up depending on which way you want to think of your arrays) then instead of setting the vertex count down by 1, set it down by 2.
That should destroy the line evenly from both ends.
only using for loop i can do it. any other methods for it? AS you said "setting the vertex count down by 1, set it down by 2" last two points are destroying. not first and last
Your answer
Follow this Question
Related Questions
using Transform on a Object will not move it 100% exactly... 1 Answer
Destroy plane behind character controller or camera 1 Answer
Change level after destroying all enemies? 1 Answer
A node in a childnode? 1 Answer
Change Script so that the object's position can be modified in the Editor/through other scripts? 1 Answer