- Home /
Question by
Ashran35 · Apr 14, 2019 at 10:09 AM ·
collisiontilemapraycasthit2d
Use RayCast2D with Tilemap collisions.
Hi everyone!
I'm trying to make a raycast hit some parts of my tilemap, but I have a problem with that. I've use the Unity TileMap tools to build the levels, and I have a GameObject that is casting a ray towards up direction.
The idea is to detect if some blocks are over the GameObject and then react based on the position of the blocks. The problem comes when the Grid is detected as one big collider (trying with Composite and without Composite), or better said, as one big GameObject when I try to get the block position.
How can I just get the position of the specific tile, and not all the grid?
Thank you all! If the question is not clear enough tell me, please.
Comment