How to fix a straight line collider

Just move the sprite shape while having Update Collider ticked.

The Update collider option is under the Sprite Shape Controller (was at the bottom for me), NOT under Edge Collider 2D.

When you add the Edge Collider 2D it defaults to a straight line, moving the game object forces it to update, editing spline should also work.

I had this as well, but updating the shape did not fix it. I believe the option that fixes this is Optimize Collider on the Sprite Shape Controller. I noticed in the video it was already enabled but it was not automatically enabled for me.

Confirming Optimize Collider fixed the issue for me. Thanks!


Optimize Collider was ticked by default for me. Unticking and ticking it again worked for me.