I am trying to make a collider along the edges of my sprite, something like what an outline shader does. I tried adding a polygon collider 2D as you can see below but it doesn’t take the shape of the sprite. Any help is appreciated
-
\$\begingroup\$ Did you try clicking the edit collider button to fit the collider polygon more closely to your sprite's shape? \$\endgroup\$– DMGregory ♦Aug 11, 2019 at 0:10
-
\$\begingroup\$ I forgot to mention that I need to do this at runtime. The collider has to adjust to the shape of the sprite at runtime \$\endgroup\$– Joe RobertAug 11, 2019 at 1:37
-
\$\begingroup\$ If you have extra requirements to add to your question, please edit your question to include them. \$\endgroup\$– JoeAug 11, 2019 at 12:47
-
\$\begingroup\$ Maybe genetate collider shapes in advance and enable/disable them in the animation together with the sprite frames. BTW very complex collision shapes often "feel" worse han simpler collisions. \$\endgroup\$– NikaasAug 13, 2019 at 7:26