Can unity dynamically adjust a custom physics outline with animation?
Hello, so far I do not believe this is possible but wonder if anyone has figured out a way to do this: Given a 2D gameObject with 1) Sprite Renderer with custom physics outline on the sprite 2) proper rigging with Sprite Skin 3) Polygon Collider2D that correctly outlines the sprite shape during initial state.
Is it possible to dynamically update the Polygon Collider2D so that the outline follows the sprite shape? Assume when animating that some parts of the sprite get stretched like the images below. I have tried recording the animation and adjusting the outline between animation frames but it just changes the outline for entire gameObject and thus changes it for all frames.
Example of collider outline for 2D sprite.
Example of animation, is there a way to automatically update the collder2D outline?
Thanks for any help out there!