- Edited
Hello! Sorry but again concept question from my side..
So, started simple RPG 2d (top down), using TileMaps. Created a level, setup a collision areas with Physics Layers for some of tiles from tiles set. So, my hero (CharactedBody2D) walking & collecting trees (well, do not ask why trees . Anyway. So, needs to track collision with trees (and they are diff colors so logic will be different), and understand - color of trees & what is really trees, not stones & other things I put in tile map. Logically, somehow I would put to any tile in TileSet a like 'group name' -- taking into account, I already setup a collision shape in Physic layer of TileSet -- (different for each color & object type - now this is just trees, in future 100+ diff type of objects from tileset), and just check with what exactly tile hero (object) collided..
And after day of googling/ trying/ testing, I found only one solution for understanding how to deal with this - to add to every tree tile below TileMap an Area2D+CollisionShape2D, and have almost 50 (I have a near 50 trees in my map) functions like _on_tree_N_body_entered(body) - to track collision..
So, could you please advise, is any other NORMAL way to track collisions within TileMap node?..
Thanks in advance!!