1 using System.Collections;
2 using System.Collections.Generic;
5 [RequireComponent(typeof(LineRenderer))]
21 private LineRenderer lineRenderer;
24 private List<Vector3> points;
32 lineRenderer = GetComponent<LineRenderer>();
33 points =
new List<Vector3>();
41 if (points.Count >= maxPoints) {
46 lineRenderer.positionCount = points.Count;
48 foreach (Vector3 p
in points) {
49 lineRenderer.SetPosition(i++, p);
void AddPoint(Vector3 point)
Adds a point to the trail.
float maxPoints
Number of points in the trail.
float minVertexDistance
Distance interval for points to be added to the renderer.
Chaos trail. Update a trail using a LineRenderer. This allows the path between points to be filled in...