12-24-2019, 05:40 PM
Hi,
A Bézier spline is defined by both the CPs and their handles. If needed, this link is a good start to understand how Bézier splines work:
https://en.wikipedia.org/wiki/B%C3%A9zier_curve
Curvy by default sets automatically the handles of CPs based on their neighbors to keep the spline smooth. This automatically set value can't possible be the right one for all use cases. So you will need to define your own handles position, and then set it up through Curvy.
To set the handles of a CP, you have to set the CP's "Auto Handles" option to false, then set the values of "Handle In" and Handle Out". These values are available both through the inspector and the API.
Once you understand how Bézier splines work, you can see in the link bellow how to set up two consecutive CPs and their handles to simulate an arc of a circle. This might help you find a solution to how to define your handles.
http://spencermortensen.com/articles/bezier-circle/
Before trying to find the formula that will give you the right Bézier handles for your automatically generated spline, I think it will help to first try to find a solution manually using the editor, and to then deduce the logic behind what you consider the right handles setup.
I hope this helped
Have a nice day
A Bézier spline is defined by both the CPs and their handles. If needed, this link is a good start to understand how Bézier splines work:
https://en.wikipedia.org/wiki/B%C3%A9zier_curve
Curvy by default sets automatically the handles of CPs based on their neighbors to keep the spline smooth. This automatically set value can't possible be the right one for all use cases. So you will need to define your own handles position, and then set it up through Curvy.
To set the handles of a CP, you have to set the CP's "Auto Handles" option to false, then set the values of "Handle In" and Handle Out". These values are available both through the inspector and the API.
Once you understand how Bézier splines work, you can see in the link bellow how to set up two consecutive CPs and their handles to simulate an arc of a circle. This might help you find a solution to how to define your handles.
http://spencermortensen.com/articles/bezier-circle/
Before trying to find the formula that will give you the right Bézier handles for your automatically generated spline, I think it will help to first try to find a solution manually using the editor, and to then deduce the logic behind what you consider the right handles setup.
I hope this helped
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.