Hello Guest

Author Topic: my box collider with which tile in a tilemap?  (Read 4100 times)

stevexu

  • Newbie
  • *
  • Posts: 29
    • View Profile
my box collider with which tile in a tilemap?
« 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?


 

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: my box collider with which tile in a tilemap?
« Reply #1 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.