Hello Guest

Author Topic: No colliders are being shown  (Read 4380 times)

DeCeOnline

  • Newbie
  • *
  • Posts: 6
    • View Profile
No colliders are being shown
« on: February 27, 2014, 01:06:02 pm »
Hi there!

I think 2D Toolkit is awesome, but it's not the first time I run across the same issue. The thing is that once I've built my tilemap, I want to set some colliders (specifically the ground) so my player doesn't fall. My player has a Rigidbody2D and a BoxCollider2D and I set the Box Trimmed collider option to my ground tile and I hit commit. When I select in the Hierarchy view the Tilemap Render Data, the collider mesh should appear, but it's seems to be missing.

Following this tutorial (http://www.unikronsoftware.com/2dtoolkit/doc/2.10/tilemap/tutorial.html) also happened to me once. I had to set each collider one by one and making sure the mesh didn't disappear. I finally did it this way, but I think it's far from what should be done.

What am I doing wrong? My collider depth is set to 10 too, but still nothing happens. I'm using 2D toolkit 2.3.3 with Unity 4.3.3f1.

Thank you!

DeCeOnline

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: No colliders are being shown
« Reply #1 on: February 27, 2014, 01:22:56 pm »
My bad!

I forgot to press "Commit" in the Tilemap (in Project view). I pressed commit in the editor mode but not in the project view. Although it's advised in the tutorial, I think it's not totally clear.

Anyways, thanks for your good work!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: No colliders are being shown
« Reply #2 on: February 27, 2014, 01:34:39 pm »
The collider stuff shouldn't matter - it automatically Commits when you press play / start the game... Thats why I didn't bother mentioning it in more detail. It should be committed before building the game for performance reasons of course.

DeCeOnline

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: No colliders are being shown
« Reply #3 on: February 27, 2014, 04:52:12 pm »
Thank you for the reply.

Then something estrange might have happened because I've hit play several times and the colliders didn't act as expected.

Anyways, I've manually pressed the commit button and worked just fine!