Hello Guest

Author Topic: Tilemap not working with 2D Physics  (Read 4508 times)

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Tilemap not working with 2D Physics
« on: March 08, 2014, 03:43:18 am »
Hi, I'm trying to switch from 2D to 3D physics and when I go into my tilemap's sprite collection and change it from 3D to 2D, then commit, it doesn't change any of my colliders. They are all still Mesh Colliders instead of Edge Colliders. I tested the swapping in the demo scene and it properly switches to Edge Colliders. Any idea why this wouldn't be working in my own project? I am using a Sprite Sheet if that matters. Thanks.
« Last Edit: March 08, 2014, 03:46:07 am by fsadeq »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap not working with 2D Physics
« Reply #1 on: March 08, 2014, 01:31:25 pm »
Are you getting any warnings / errors in the console? You need to make sure that everything is converted properly and hasn't broken out early for some reason or other. Creating a sprite form this collection should create 2d colliders.

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Tilemap not working with 2D Physics
« Reply #2 on: March 08, 2014, 03:19:21 pm »
No console warnings or errors. What else needs to be converted other than the sprite collection?

Also, when I create a sprite manually in the scene from the same collection, it properly creates a Box Collider 2D as expected. It's only the tilemap that is still creating MeshColliders instead of Edge Collider.
« Last Edit: March 08, 2014, 03:22:04 pm by fsadeq »

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Tilemap not working with 2D Physics
« Reply #3 on: March 08, 2014, 08:39:37 pm »
No idea why, but I rebuilt the indexes and it works now. Oh, well.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap not working with 2D Physics
« Reply #4 on: March 08, 2014, 08:51:20 pm »
That makes no sense at all, the tile map doesn't use the index for any relevant data. Oh well :(

fsadeq

  • 2D Toolkit
  • Sr. Member
  • *
  • Posts: 353
    • View Profile
Re: Tilemap not working with 2D Physics
« Reply #5 on: March 09, 2014, 03:20:33 am »
I did also restart Unity - who knows.