Tilemap Collisions not registering after certain tilemap coordinate

Hello, I am trying to create a 2D tilemap that has walls for the player to collide with. I am doing this using a collision object with the shape specified as the tilemap. The collision object for the player, the collision group for the tile source, and the collision masks are all done correctly. For some reason, the collisions refuse to generate after a certain y coordinate threshold. What am I doing wrong?

Could be running out of a resource. Are there any error messages in the editor console?

2 Likes

Hello, I am not getting any error messages in the console. I also tried decreasing the size of my generated tilemap, but it still has a hard cut off at y = 2378. Any tile below that point has the correct collision mappings, but any tile above does not have any collision box. I should also mention that the map is generated via script using tilemap.set_tile(), so maybe that has something to do with it?

I also tried changing the position of the level game object containing the tilemap, and the tilemap itself. In both of these scenarios, the collision generation still had a clear cut off, albeit at a different y-coordinate. It seems there is just a horizontal invisible line where anything above it just cannot take on a collision box for whatever reason.

Can you share a minimal project where this problem can be seen?

@Riptide776 He meant the source code of the minimal repo case not the compiled projects.

Thank you for the correction! Sorry I am still new to Defold. So would this mean I share the lua scripts in the repo case?

Yes, your Defold project folder (without /build folder). But first, please remove every unnecessary stuff(code, assets, collections etc.) and minimize your necessary scripts so everyone can easily read and reproduce your problem.

Here is the minimal project .zip:

sample.zip (49.5 KB)

Just wanted to bump this and see if anyone was able to find out what was causing the problem?

Thanks for the report!
I can reproduce it here as well.
I’m not sure yet why it behaves that way, but that’s my first step to find out.

2 Likes

Thank you for checking it out for me! Let me know if I can provide any other information that would help.