Godot Version
4.3
Question
Hi I am trying to detect collisions with my game tiles. I was using a tile map before but it became a bit too limiting as I want to have lots of tiles that can be interacted with so I decided to make each tile its own node and recode a lot of stuff. The hardest thing about it though is actually getting which tile the mouse is hovering over.
I was using an area 2d with the mouse entered and exit signals to get the tile being hovered over. If the mouse entered a tile the tile would call a function in my world script, passing itself as a parameter, which I could then use to remove tiles / place tiles. However when tiles were adjacent to each other the mouse exit signal would fire after the mouse enter signal. So the next tile hovered over would update the tile hovered over, and then the exit signal from the previous tile would fire which set the hovered tile to equal null which basically meant the game thought I was hovering over no tile when I was actually.
Is there a simpler easier way to handle this? Ive been really stuck for 2 days now. Ive seen some stuff on raycasting but this is such a simple thing and It doesnt seem like it should be this complicated. I feel like im just missing something. Does anyone know what I could do? Thanks