Announcement

Collapse
No announcement yet.

PolygonCollider2D added to a sprite with two separate parts

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PolygonCollider2D added to a sprite with two separate parts

    When I use polygon collider 2d with such 2 separated parts in one sprite (one image), collider geometry only applies on one part. Because while another collider collides with one part of it, doesn't collide with other part of it. Even enabling detect holes doesn't change the result. Is that normal behavior or something else I should consider?

  • #2
    Hi ashemez !

    Looks like something is not working propperly and only checks if collides with the first detected polygon, Im reporting it as a bug.

    Sorry for that, while we are looking to it, you can:
    - Use two Polygon Collider :-|
    - Add it from code, and set PolygonCollider2D.Vertices[] with the polygon points manually :-( (renember not to add and image, because ir overrides it)

    Also you can check our samples https://github.com/WaveEngine/Sample...ckyProjectiles this prefab https://github.com/WaveEngine/Sample...s/arrow1.wpref has a PolygonCollider2D where you can checkout how it works with one-block poligons

    Comment

    Working...
    X