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?
#1
Hi, I using Curvy to make roads in my game.

Player can delete and move control points, but when this done the rest of the spline changes shape, so the spline does not match the road mesh.

I would like the spline not to change shape when control points are deleted or moved. How can I do this? I cannot find a way in the api to do this.

Thank you.
Reply
#2
Hi
Do you want the spline to not change at all, or do you want the change to be more localised? If it is the latter, try set the interpolation type of your spline to Bezier. Bezier, compared to Catmull-Rom or BSplines, have its Control Points modify a smaller part of the spline around it.
Did this help?
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#3
Thank you for message.

I want the spline to not change at all. 

(And I am using Bezier).
Reply
#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
#5
Hi
Thanks for sharing the solution.
What you described is what I meant with "the change to be more localised". Now I understand exactly what you meant.
Sorry for not having answered a useful answer.
Have a nice day
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to duplicate a spline with an offset Kapistijn 7 646 02-07-2026, 07:59 PM
Last Post: _Aka_
  Control Point Interpolation Overrides. rickgplus 1 351 12-11-2025, 08:52 AM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 495 11-13-2025, 11:32 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,064 07-29-2025, 09:15 PM
Last Post: _Aka_

Forum Jump: