public Spline GetSplineInWorld(Vector3 p) { var spline = new Spline(); foreach (var face in hairLayers) { var tr = face.transform; var pWorld = tr.TransformPoint(p); spline.Add(pWorld); } return spline; }
public void DrawSplineInScene(Spline spl) { var dt = 1f / resolution; var vertices = spl.Discretize(resolution); Handles.DrawPolyLine(vertices); }