2D Toolkit Forum
2D Toolkit => Support => Topic started by: finaldev on November 17, 2012, 10:34:16 pm
-
Hey guys,
If someone could point me in the right direction for the following it would be greatly appreciated!
I was wondering if it was possible to create a 2D line at run time?
Is it also possible to create the line with a polygon collider and manage the collider's points at run time?
Thanks in advance,
-
1. Create a 2D line - there's a sample here:
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,293.0.html
2. Polygon collider points at runtime - no. It is really really slow to create polygon colliders. You can't modify them once created, so changing the collider will involve recreating it. Not a good way to do this. I suggest using box colliders to approximate shape - the cost for moving them is a lot lot lower.