UnityGameProjectsCode / Rise2Point0Game / Tools / FaceTowards.cs
FaceTowards.cs
Raw
using UnityEngine;

public class FaceTowards : MonoBehaviour
{
    private LineRenderer lineR;

    private void Awake()
    {
        lineR = GetComponentInChildren<LineRenderer>();
    }

    private void Update()
    {
        transform.position = lineR.GetPosition(0);

        transform.LookAt(lineR.GetPosition(1));
    }
}