Jump to content

How make LAYER is full collision?


Recommended Posts

'm generating the tiled map editor, and how to do a layer be fully collision? 


Created several layers: water, ground, trees, objects, etc.. 

How do I get one of these layers, specific, be collision? I do not want to set any collision point, everything is automatic ... 


var collision_water = mapa.createLayer('water');
var collision_ground = mapa.createLayer('ground');
var collision_tree = mapa.createLayer('tree');

//collision_water.setCollisionRange(0, collision_water.total - 1, true, true, true, true);
//collision_ground.setCollisionRange(0, collision_ground.total - 1, true, true, true, true);
//collision_tree.setCollisionRange(0, collision_tree.total - 1, true, true, true, true);


thank you

Link to comment
Share on other sites


  • Recently Browsing   0 members

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