Example #1
0
 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;
 }
Example #2
0
 public void DrawSplineInScene(Spline spl)
 {
     var dt = 1f / resolution;
     var vertices = spl.Discretize(resolution);
     Handles.DrawPolyLine(vertices);
 }