Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best approach to mirroring with scripts intact?
#4
Try adding this to the CurvyUtility class (CurvyUtility.cs):

Code:
/// <summary>
/// Flips the direction of a spline, i.e. the first Control Point will become the last and vice versa.
/// </summary>
public static void FlipSpline(CurvySpline spline)
{
      spline.ControlPoints.Reverse();
      spline._nameControlPoints();
      spline.Refresh(true, true, false);
}

You'll need to call this from a script or add a button to the spline inspector if you want it within the editor.
Reply


Messages In This Thread

Possibly Related Threads…
Thread Author Replies Views Last Post
  Playmaker setup errors and missing scripts? justifun 9 6,458 08-06-2024, 09:41 AM
Last Post: _Aka_
Question Including scripts on created meshes lewsk55 1 1,358 10-04-2022, 10:46 PM
Last Post: _Aka_
  Spline Controller and Editor Scripts: changes not saved ABTOMAT 1 5,435 05-26-2016, 11:18 AM
Last Post: Jake

Forum Jump: