Tilemap can't remove static body 2d

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By hansolo
:warning: Old Version Published before Godot 3 was released.

I have created a tilemap as explained in docs. I added StaticBody2D nodes to some of the tile types. After saving and testing the project, I realised that colliding with these bodies did not return the tile sprite of the cell, but the tile map node itself (As also pointed here).

So, I decided to get rid of static bodies as they are practically useless for me. I returned to the tileset_edit scene, removed the static body nodes. I converted the scene to the tileset again, by overriding the existing one (Merge with existing = Off).

However, when I test my project, the tilemap still collides with my objects. When I set the collision shapes visible, I can still see that these particular cells are blue.

How can I remove these static bodies?

I don’t know if this is helpful, but get_collider_metadata will return the cell involved in the collision on a tilemap.

aozasori | 2017-09-15 15:39

Oh, I didn’t know that such thing exists. It would be useful, thanks.

hansolo | 2017-09-16 08:45

:bust_in_silhouette: Reply From: hansolo

Ok, I’ve found the problem.

Updating the resource itself didn’t update the TileMap’s tile set property. When I updated resource (tileset file), Godot changed the tile set property of TileMap to something named Terrain which seems to be the copy of my old tile set. So when I clear the property and load the file again, it recognizes the new tile set.