private void UpdateArcs() { FingerArc.UpdateArcLights(); int maxActiveArcs = surfaceArcs.Length - numFingersEngaged; for (int i = 0; i < surfaceArcs.Length; i++) { surfaceArcs[i].gameObject.SetActive(i < maxActiveArcs); } if (Random.value < randomSurfaceArcChange) { SurfaceArc arc = surfaceArcs[Random.Range(0, surfaceArcs.Length)]; if (Random.value > 0.5f) { arc.gameObject.SetActive(true); MeshSample point1 = sampler.Samples[Random.Range(0, sampler.Samples.Length)]; MeshSample point2 = sampler.Samples[Random.Range(0, sampler.Samples.Length)]; arc.SetArc(point1, point2, transform.position, SurfaceRadius); } else { arc.gameObject.SetActive(false); } } }