Jump to content

1.1.4: Tilemap.putTile() does not cause collision info to be updated


jcs
 Share

Recommended Posts

calling putTile() calls calculateFaces(), but this does not set the collision information on the existing tiles

 

which means that once you change a tile to a value that collides differently the face information for the map is broken - sprites can get 'inside' the faces etc

 

entered github issue #371 :)

 

Link to comment
Share on other sites

  • 2 weeks later...

I was having this problem too. Although having used the fill method to change tiles instead of putTile. I found that if I made another call to setCollision after making the change then the collisions would work correctly.

 

So something like:

 
tilemap.fill(1, 0, 0, 10, 10, 'ground_layer');
tilemap.setCollision(1, true, 'ground_layer');
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...