How to update 2d collision in Sprites with transparent areas?
There is a video below that shows what I would like to be able to implement in my project.
https://www.youtube.com/watch?time_continue=15&v=GKJsSi6irko
And I downloaded the project to test. Only that there was a problem, after the sprite is hit by the shot and destroys a part of it but the sprite collider does not update.
Detail, this sprite was created from an existing
Texture2D tex = (Texture2D) Resources.Load("ground2");
Texture2D tex_clone = (Texture2D) Instantiate(tex);
sr.sprite = Sprite.Create(tex_clone,
new Rect(0f, 0f, tex_clone.width, tex_clone.height), new Vector2(0.5f, 0.5f), 100f);
Can someone help me?
If someone has doubts about my question and would like to check the project I downloaded, here it is> https://github.com/marcoprado17/Unity3d-WormsDestructibleTerrain