Hello everyone, new member here. I need a little help, I asked this question before on reddit but I haven't found a solution yet.
I have a main Scene World
, in that I have a TileMap
and a Area2D
(see here).
TileMap
is the brown wall texture, and Area2D
is the Godot logo.
My goal here is find whichever tile overlapped by Area2D
and remove them. As you can see the Area2D
overlap 2 tiles and I able to print the current overlapped tiles which they have the same ID (?).
extends Area2D
func _on_ClearBox_body_entered(body):
for i in self.get_overlapping_bodies():
if i is TileMap:
print(i)
I can't seem to remove the overlapped tile. I tried to use set_cellv
but I can't get the position of those tiles, i.global_position()
return (0,0)
What I'm missing here? Thanks everyone.