Search Unity

Edit physics shape doesn't update polygon collider for sheets with multiple sprites!?

Discussion in '2D' started by esco1979, Jan 22, 2018.

  1. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    Hey, everyone. So I was really excited about the edit physics shape option now available for sprite sheets when I heard about it. I figured I could use it as a quicker way of making more accurate hitboxes in my 2D game.

    ................ until I tried it in-game with an animated sprite and noticed that the polygon collider does NOT update when the sprite changes. And there doesn't appear to be a setting anywhere that will allow this. Am I missing something? Or is the only way to do this at the moment to check for when the sprite changes and then delete and re-add the polygon collider (which is just a waste of resources and a dirty hack basically. But does change the collider to use the current sprite's physics shape).

    Thanks in advance.
     
  2. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    Really? No one knows anything about this or has anything to say about it? SMH.
     
  3. chilon

    chilon

    Joined:
    Feb 10, 2019
    Posts:
    9
    Even if it worked, when you save changes to a sprite within a spritesheet from an editor script it trashes your physicsShape.