Hello Guest

Author Topic: 2 mesh colliders not colliding  (Read 4683 times)

p0wn

  • Newbie
  • *
  • Posts: 3
    • View Profile
2 mesh colliders not colliding
« on: February 08, 2013, 09:14:23 pm »
I'm new to both Unity and 2d Toolkit.

That said I've set up 2 sprites on top of each other with polygon mesh colliders with a z scale of 10. One's rotation and position is locked, the other is only rotationally z-locked. Here's a screen capture of the setup http://cl.ly/image/1l1n2V0x0A2j

Any reason why when I click play the one on top just falls through the other one?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2 mesh colliders not colliding
« Reply #1 on: February 08, 2013, 10:44:40 pm »
Yes, Unity doesn't allow 2 polygon colliders to collide, unless at least one of them is convex. Thankfully, in your example, those shapes are convex. All you need to do is tick "Convex" in the sprite collection editor, and you're good to go.

p0wn

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: 2 mesh colliders not colliding
« Reply #2 on: February 08, 2013, 11:05:47 pm »
Thank you

p0wn

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: 2 mesh colliders not colliding
« Reply #3 on: February 08, 2013, 11:41:12 pm »
You may want to update http://www.unikronsoftware.com/2dtoolkit/doc/tutorial/creating_polygon_colliders.html and make it so in the tutorial you check the convex  button. Very confusing to the n00b otherwise.