How to make a render start from one object to several objects around him.
public Transform startPoint; private GameObject[] ends; private LineRenderer _Line; void Start() { _Line = GetComponent(); ends = GameObject.FindGameObjectsWithTag("red_cube"); } void Update() { for(int ii = 0; ii < ends.Length; ii++) { _Line.SetPosition(0, startPoint.position); _Line.SetPosition(1,ends[ii].transform.position); }
example