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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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