2D Toolkit Forum
2D Toolkit => Support => Topic started by: wagenheimer on October 14, 2014, 03:32:33 pm
-
Hi!
I suggest adding a generate polygon button when creating collision of sprites on a sprite collection.
There is an algorithm which is very easy to implement and gives good results, "Graham's (1972) point elimination algorithm", basically you get all non alpha points of the image, runs the algorithm on it and it returns the final polygon! =)
I have ton of sprites and have to create all polygons by hand! This would be an excellent addition to 2DToolkit! =)
Is this possible?
-
Hi,
I've implemented a similar algorithm before for another project, but I don't have the time to implement something like that for 2D Toolkit. There are tk2d addons that already do contour detection - eg. http://2dtoolkit.com/forum/index.php?topic=1334.0