I want to get the cells touched by collisions in a grid map

Godot Version

4.2.1

Question

For example, a spherical collision will change a cell into a spherical shape, etc.
I want to change a specific range of cells.

This is not clear.

You can check colliding body shape via body_shape_entered signal.

I want to change the cell at the contact position.
Using slope collision, the grid map looks like a staircase.

I would create a grid “tile” that is just an area3d and it will have a script that will change a transplant mesh or quad to the color you want when a body enters its area. Then paste that tile everywhere.

You can make a custom signal and find the position reference on the gridmap.

1 Like