Physics debug not showing tilemap collision groups

So, I’m working on a game that utilizes tilemaps, and I’m trying to get a collision group specified within the tilemap to trigger a message to the on_message function. My player object has a sprite with a kinematic collision object attached as well, and the collision object attached to the main game object with the tilemap is a static object. I set the tile source’s collision property to the tileset png file, and did the same for the image property. Everything seems to be configured properly.

However, not only is it not triggering the messages, but when I enable physics debug mode, the collision object for the tiles I selected isn’t showing up.

I had another community member, look over my codebase and he said that eveything looks right and should work.

Does anyone have any suggestions? This exact configuration worked on a different project with a different tile source but similar structure.

Check this example: Tilemap collisions

I’ve used it thoroughly and double checked and triple checked my settings. I had another developer check my code and he couldn’t figure out what was wrong either.

Would you try to reproduce my problem if I gave you a link?

If it is not showing then definitely you are doing something wrong.

You can try to reproduce your problem on a new project(just with tilemap and collision layer) and if the problem persist then you can share it here. More people can check out your project and try to figure it out.

1 Like

So I created a new project, and used only rendercam, tilemap, and collision layer, and it works.

Then I imported everything else, and now it works. The only difference between the projects is that the main collection is centered around the (0,0) coordinate in the first project which does not work, and in the second one, the bottom left of the main collection is at the (0,0) coordinate.

Well, I haven’t added the Defold Tilemap Animator asset yet. Hopefully, that won’t break functionality.

So maybe my old project was corrupted or something? Is this a possibility?

Don’t think so. It seems like a human error to me :crazy_face:

Not likely. Good that you solved it though, but annoying that we don’t know why :slight_smile:

Not discounting that possibility, but it could have been that I originally imported the tilemap from Tiled, and added the tiles with collision groups from within Defold, and that may have corrupted the tilemap.

When I recreated the project, I added the tiles with collision groups from within Tiled instead, thus fixing the problem.

Good to hear! Glad it wasn’t the extensions. :slight_smile: