11-15-2018, 08:22 PM
(11-15-2018, 10:55 AM)_Aka_ Wrote: Hi,
From looking at the pictures, I suspect a sign inversion of the handles coordinates, and maybe even a scale issue.
In the following picture, you will see that the handles of this CP are all going in the same direction, instead of opposite ones (which is needed to have smooth curves). The same is true for all the CPs.
And from looking at the JSON file you feed Curvy with, the suspected sign inversion is done before reaching Curvy.
I don't have access to Adobe Illustrator, so I can't open your ai file and export the spline. Can you please send me the exported JSON, the one with no modifications related to Curvy. Also, a screenshot from within illustrator showing the handles of the control points (and their positions too if possible) would be helpful.
Thanks
Yes you are right. I am using Math.abs() on all handles in javascript.
JSON file is attached. It's in the SimpleSpline.zip file.
Can't send the screenshot of handles because I can only get position of one handle at a time. Can print all handles but the problem is all handle positions are relative as they are substracted from Artboard (like Canvas or Parent GameObject) to be able to read from multiple Artboards.
Sorry. I have moved on from the import process to creating the game art. It's taking a lot of time. Will get back to this later.
Thanks.