forked from byteB8/3D-motion-capture---python-unity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLineCode.cs
More file actions
27 lines (22 loc) · 642 Bytes
/
Copy pathLineCode.cs
File metadata and controls
27 lines (22 loc) · 642 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LineCode : MonoBehaviour
{
LineRenderer lineRenderer;
public Transform origin;
public Transform destination;
// Start is called before the first frame update
void Start()
{
lineRenderer = GetComponent<LineRenderer>();
lineRenderer.startWidth = 0.1f;
lineRenderer.endWidth = 0.1f;
}
// Update is called once per frame
void Update()
{
lineRenderer.SetPosition(0, origin.position);
lineRenderer.SetPosition(1, destination.position);
}
}