How can find the value of linerenderer vertex position?
There is a SetPosition() function to edit a value,
but no GetPosition()function that just returns the current value.
I want to make an existing line longer:
a cable lowering an object.
The cable has a start distance set in the inspector.
Create a List; and add there your positions, after you can acess it like an array:
using System.Collections.Generic;
...
public List<Vector3> lineRendererVertexes;
....
lineRendererVertexes = new List<Vector3>();
....
lineRendererVertexes.Add(newPosition);
....
for( int i = 0; i < lineRendererVertexes.Count; i++)
{
lineRendererVertexes *....*
}
Created a variable that i manually set to hold the same value as the value in the inspector.
And add the movement distance to that value to find the final value I need.