Gridmap and some (destructible?) parts

Godot Version

4.6

Question

Is it possible to have some “destructible” parts in a gridmap tile? i.e. a wall with glass zone that can be destroyed by projectile?

Hi there, sorry i’m pretty new and probably my question could appear (or really be…) stupid.

But i have a decent skill on blender so am doing some experiment with it,

one is about gridmap: i make a set of 3d tiles about streets and concrete walls, and i’m making a street map with road and some houses, it was pretty fun and fast to build some experimental levels and the second thought was (could i make some wall part in glass and maybe destroy it with weapons?)

i try making it with different materials and visually it work →the glass parts have *blender made* material called “vetro” (glass in italian…) and the shader is semitrasparent (as i set up on blender)

but…

how can i set the HIT on that part and let him shade out if hit?

need to put different colliders (imagine yes…)

or better… need to remove the glass from the gridmap and add it in a second wave or a second gridmap done only with glasses?

or something else that i dont consider?

thanks in advance…

link to a little sample video of what i’ve reached…

You can’t add script on individual Gridmap’s block so you’d have to separate the destruction parts from Gridmap. In your case make wall, ceiling..etc with Gridmap and leave holes for windows. You can then add a window with a script for destruction and duplicate/place them in.

thanks a lot, i will try this way and take the tip for another thing:

in case of a car (yes…i will add cars too :D) the windows and windshield could be done inside (doing with different collision part and mesh ok) and destroyed right?

Yes, same concept.

FWIW, I usually keep the “special” objects in the gridmap (or tilemap for 2d), so I can design the level in the map and not need to place extra Nodes. when loading the gridmap (or on _ready()) I instantiate the special objects accordingly and remove the cells from the map.

that was a great idea, indeed i need to understand how to do it :smiley: but probably having a placeholder to keep the level map integrity is a great idea.

And probably doing a routine to remove the items and place their “special interactive version” is the way-to-go so thanks a lot for the suggestion.

Indeed in the map i will have lot of “reactive” zone, like elevators (now i’m diving on those to understand how to implement those fking buttons and doors, i’m a noob :smiley: learning…) and glass windows, bus stops and traffic lights…

so lot of work ahead, but lot of fun too :smiley: