PC-PAUL\paulf 5a58064e4d Fixed a lot of errors:
Obosolet methods, null references
Removed dead code
Clean Code
2025-01-16 11:07:26 +01:00

22 lines
500 B
C#

using UnityEngine;
using System.Collections;
public class laserScript : MonoBehaviour {
public Transform startPoint;
public Transform endPoint;
LineRenderer laserLine;
// Use this for initialization
void Start () {
laserLine = GetComponentInChildren<LineRenderer> ();
laserLine.startWidth = .2f;
laserLine.endWidth = .2f;
}
// Update is called once per frame
void Update () {
laserLine.SetPosition (0, startPoint.position);
laserLine.SetPosition (1, endPoint.position);
}
}