Destroying 2D terrain at runtime
Hi, My aim is to be able to "exploded" any part of this terrain, removing an area of the terrain and updating the collider. I've created a 2D mesh as my terrain using an array of triangles and vertices positions. Looking like this:
What would be the best way to go about this? I've tried converting it to a 2DTexture instead so I can attempt to paint pixels, but the quality is much lower. If anyone has some suggestions please let me know, thanks!
So that I can then add pixel destruction, thankyou.
TL;DR: I want to be able to destroy any area of this terrain like a small explosion radius, and I would like to know how to go about it, while updating the collider.
You said it in the title but not in the text. You need to convert a 2D mesh into a sprite. Right? During runtime or in editor? Why you need the sprite? To modify it during runtime? Im sorry i dont have the wisdom you need, but giving info will help to other people with wisdom.
Bye!
Sorry for the bad formatting and bad question, updated
Dobyou know about navmesh? $$anonymous$$aybe you need to add a sprite over the terrain where the explosion is, so the player see the "change". And then update the nav mesh area, or make this new zone of the map a navobstacle. (Im writing from the mobile and can not make easy links, look for nav mesh area.
Bye!