Search Unity

Polygon Collider2D goes through another Polygon Collider2D

Discussion in '2D' started by VOiD-Games, Feb 8, 2016.

  1. VOiD-Games

    VOiD-Games

    Joined:
    Dec 7, 2012
    Posts:
    8
    HI everyone,

    Having a problem with some Polygon 2D colliders. Hopefully someone can help me.

    Why does the tadpole's polygon collider 2D pass through the polygon collider2D for the rock at certain angles?

    tadpole.jpg
    rock.jpg
     
    Last edited: Feb 8, 2016
  2. Hyblademin

    Hyblademin

    Joined:
    Oct 14, 2013
    Posts:
    725
    Does it seem to depend on the speed of the tadpole object, i.e. faster movement means more likely to pass through? Have you tried setting the Rigidbody2D component's collision mode to continuous? That should prevent it from passing through static colliders (ones with no Rigidbody).
     
  3. VOiD-Games

    VOiD-Games

    Joined:
    Dec 7, 2012
    Posts:
    8
    Hi Hyblademin,

    The faster the Tadpole object moves the more likely it is to pass through an object (rock) that only has a Polygon collider. The Rigidbody2D components collision mode is already set to continuous. The results are the same.

    Any more ideas? It seems the vertices lines somehow make its way into the object.

    Thanks, Chris.