Jump to content

setTileIndexCallback and enabled collision...


universaljs
 Share

Recommended Posts

Hello

I try create callback function - when exist collision, but in phaser I found only this method: setTileIndexCallback - but this method disables collisions. 

map.setTileIndexCallback([9,10,11,12], function(){ console.log("callback and collision...?");})

Does anyone have an idea how to create a collision with a tile-map of the callback function?

Link to comment
Share on other sites

I *think* I understand what's going on. This sets a custom callback when something collides with those tiles. But it doesn't do a physics collision. You need to use one of the physics systems' collision methods for that, like "game.physics.arcade.collide(things, otherThings, this.handleCollision, null, this);".

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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