How can i basically? edit the position of a line rendereR?
i used linerenderer.position but i cant put it, instead it targets the center of the gameobject?
how can i cast my linerenderer from the position in my image below? Thanks in advance!
using UnityEngine;
using System.Collections;
public class DrawLine : MonoBehaviour
{
public LineRenderer lineRenderer;
private GameObject origin;
private GameObject destination;
void Start()
{
origin = GameObject.Find("Player");
destination = GameObject.Find("Destination");
lineRenderer = GetComponent<LineRenderer>();
lineRenderer.SetWidth(.1f, .1f);
}
void Update()
{
lineRenderer.SetPosition(0, origin.transform.position);
lineRenderer.SetPosition(1, destination.transform.position);
}
}