Hello Guest

Author Topic: Polygon Collider Not Generating  (Read 4701 times)

Ceraph

  • Newbie
  • *
  • Posts: 8
    • View Profile
Polygon Collider Not Generating
« on: May 13, 2013, 03:21:39 pm »
Hello, I'm fairly new to Unity and 2D Toolkit and I'm having some problems getting the polygon colliders to work. I'm currently only trying to get it to work against box colliders, which from what I've read should be fine without using convex colliders, though I have tried checking "convex" and it still didn't work. I've followed the tutorial and as near as I can tell the polygon collider is not actually being generated when I commit the sprite collection. I've attached a few screenshots to illustrate this but when I create the polygon shape in the editor it looks fine. Then when I go to the 3D view I don't see it around the sprite, like it does in the example screenshots. I've also included the properties of the rigidbody and box collider in the screenshot in case that has something to do with it.

If you need any more information please let me know.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Polygon Collider Not Generating
« Reply #1 on: May 13, 2013, 10:13:55 pm »
The current version of 2D Toolkit can't animate polygon colliders. You can either use a box collider for now, or use a non-animating polygon collider, or alternatively use some other means to animate it (eg. store all the frames as children of one game object, and enable/disable them as required).

I'm still unable to confirm if 2D Toolkit 2.0 (which is due out real soon now) will support this feature - I have something working, but I'm not sure if I can get it stable enough before release.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Polygon Collider Not Generating
« Reply #2 on: May 13, 2013, 11:00:44 pm »
Having said that - I just tried the old code again... works pretty decently in 2.0. I could release it as an unsupported addon... I'll think about it after 2.0 is out.

Edit: The catch is while it does work, it still does cost a significant amount more performance than using box colliders...