08-16-2017, 06:51 PM
Each CP have a Length property as well as a Distance one. The latter tells the Distance from the start of spline.
So if you want to split a segment in half do something like:
So if you want to split a segment in half do something like:
Code:
var pos=spline.InterpolateByDistance(cp.Distance+cp.Length/2);
var newCP=spline.InsertAfter(cp);
newCP.position=pos;