Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to stop spline refreshing when a control point is deleted or removed?
#4
I think I found how to do it, so I will write it here to help anybody else that needs it.

This is when using Bezier splines:

To stop neighboring spline segments from changing shape when you delete a segment, all you need to do is set AutoHandles = false for the control points next to the ones you remove. This keeps the original angle of the spline that comes from them.


Code:
cpBeforeSplit.AutoHandles = false;

cpAfterSplit.AutoHandles = false;

theSpline.Split(cpAfterSplit);
Reply


Messages In This Thread
RE: How to stop spline refreshing when a control point is deleted or removed? - by Beaver_Boy - 07-23-2022, 10:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: