Posts: 2
Threads: 1
Joined: Aug 2021
I work with a lot of complex 2d polygon and edge colliders. These already exist in my scenes. Is it possible to auto generate splines that follow the outlines of these colliders? Essentially the reverse of creating colliders from existing splines. If this isn't possible out of the box, is there a good way for me to accomplish this with the API? (I do not own the asset at this point.)
Posts: 2,063
Threads: 88
Joined: Jun 2017
Hi
You can do that via the API. You can see a simple usage of the API here:
https://www.youtube.com/watch?v=dhd08ECFPD4&list=PLatR0iPtXq-x8gDP9tNaxC5Pp32DEL6fS&index=3
So in your case, you will set the spline's interpolation type to Linear, and then go thought all your collider's points and add them to the spline.
Let me know if you need more details.
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.
Posts: 2
Threads: 1
Joined: Aug 2021
Thanks for the quick reply! I think that should do the trick...