2D Toolkit Forum

2D Toolkit => Support => Topic started by: stevexu on July 16, 2013, 04:57:27 pm

Title: my box collider with which tile in a tilemap?
Post by: stevexu on July 16, 2013, 04:57:27 pm

Thanks  for each replay.

I  import  3  tiles  from a   tmx,    then  I create  a   box . My  question  come:
How to  detect my box  collider with which tile?


 
Title: Re: my box collider with which tile in a tilemap?
Post by: unikronsoftware on July 16, 2013, 05:37:14 pm
You can find out what tile something is touching using tileMap.GetTileAtPosition. After that you can try to work out what you are touching. Everything is baked down into one big collider, so it won't be possible to tell you exactly what you're touching. If you need to interact with objects, make them prefabs.