- Home /
Question by
Oinkifier · Feb 22, 2020 at 05:00 PM ·
2dtilemaptilecollisiondetection
How to get which Tile in a tilemap another GameObject collided with?
Hello
In my game I have a Tilemap. I also have a script that spawns obstacles onto that tilemap. They consist of chunks of lava and single diamond tiles. I also have a Drill gameObject that digs down and follows the mouse. All of that is working, however, I want to be able to detect which kind of obstacle (lava or diamond) the Drill collides with, if it does collide, and also get its position in the Tilemap. How would I go about doing that?
Comment