I'm making a top down 2D game in Unity, here's my doubt: how can I add "hole" tiles to it, so the player could fall (something like Zelda: Link to the past, or the water tiles in Enter The Gungeon)?
The solution I thought is to put tags on each tile (ground, hole, trap, etc), put the player on Z = -5 and use the 3D Physics.Raycast to check in which tile the player is. But that doesn't seem optimized, I would need to spam colliders in every tile and use the Raycast at each frame. Can you guys give me better alternatives?
Thanks a lot! :)