private void Deform() { if (m_Generated != null) { meshBender.SetInterval(m_Spline, m_Spline.Length * rate); meshBender.ComputeIfNeeded(); } }
//came from spline asset private void Contort() { float nodeDistance = 0; int i = 0; foreach (var n in spline.nodes) { float nodeDistanceRate = nodeDistance / spline.Length; float nodeScale = startScale * (rate - nodeDistanceRate); n.Scale = new Vector2(nodeScale, nodeScale); if (i < spline.curves.Count) { nodeDistance += spline.curves[i++].Length; } } if (generatedModelGameObject != null) { meshBender.SetInterval(spline, 0, spline.Length * rate); meshBender.ComputeIfNeeded(); } }