07-26-2018, 06:10 PM
The orientation is computed based on control point's rotation, in addition to other factors. So what you expressed as "a way to lock in the right orientation adjustment at instantiation of the control point" boils down to setting the right orientation at the control point's instantiation.
The methods to add control points (CurvySpline.Add, CurvySpline.InsertAfter, ...) have an override to define position at instantiation, but no such override exists for orientation. The created control points will have a default orientation (X=0, Y=0, Z=0). So you will have to modify the orientation after instantiation using CurvySplineSegment's SetRotation or SetLocalRotation.
I think that the rotation of the last control point by 180° (while setting Orientation as Dynamic) should be enough for your case, but if it isn't, then the way to figure out the right control point rotation to set will be something like:
Orientation at N = (Orientation at N-1) * (the rotation between Tangent at N-1 and Tangent at N)
N being a control point on the spline, and N-1 being the previous control point.
The methods to add control points (CurvySpline.Add, CurvySpline.InsertAfter, ...) have an override to define position at instantiation, but no such override exists for orientation. The created control points will have a default orientation (X=0, Y=0, Z=0). So you will have to modify the orientation after instantiation using CurvySplineSegment's SetRotation or SetLocalRotation.
I think that the rotation of the last control point by 180° (while setting Orientation as Dynamic) should be enough for your case, but if it isn't, then the way to figure out the right control point rotation to set will be something like:
Orientation at N = (Orientation at N-1) * (the rotation between Tangent at N-1 and Tangent at N)
N being a control point on the spline, and N-1 being the previous control point.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.