Tilemap collisions not working when generated by a factory (DEF-3758) (SOLVED)


I want to create a tilemap in which its tiles are generated in runtime and in which the tilemap itself is generated in runtime by a factory. The problem is that if I try to generate a tilemap with the factory, the tilemap collisions don’t work, but if I try to instantiate the tilemap in the collection without using the factory, the collisions work.

Defold version: 1.2.145
OS: macOS 10.14.2
Link to a project to simulate this bug: https://mega.nz/#!yGR12aKC!BNsN_PJB89oqW7rxKMaSaZGaIOCHmKDOz1WGxSK2usc
There are two collection in this project that you can choose to run: factory.collection for testing the bug and instantiated.collection to demonstrate that the collisions work if the tilemap is not generated by a factory.


Yes, this does indeed look like a bug. I guess it is a combination of spawning the tilemap using a factory and then using set_tile() to populate the tilemap with tiles that causes the collision shape to not update properly. @Johan_Beck-Noren, @sven, @jhonny.goransson, can you confirm?

Attached project here:

Collision Bug.zip (70.9 KB)


Any update on this?


No, no update. We plan our next sprint (two weeks of work) tomorrow (Monday). We will evaluate and prioritise this issue during our planning session.


Created DEF-3758

split this topic #6

7 posts were split to a new topic: Removing tiles from tilemap updates collision shape but does not affect objects at rest (DEF-3810)


Released in Defold 1.2.147