private void Move() { Vector3 normalizedDirection = Vector3.Normalize(positions[index].position - transform.position); transform.position = transform.position + normalizedDirection * moveDistance; if (Vector3.Distance(transform.position, positions[index].position) <= moveDistance) { index++; if (index == positions.Length) { fpsCounter.SendFPSData(); CancelInvoke(); } //index = (index + 1) % positions.Length; } //tm.UpdateShaderValues(); }