ferlahozseg Posted November 16, 2015 Share Posted November 16, 2015 Hi! I'm developing a game in phaser 2.4.4 and i need your help. I don't know how to get working collisions between the tilemap and the sprites... I'm using P2JS physics and for the collisions between the sprites i have used the function setImpactEvents(true) and the collides(...) function in the update method. I dont know how to do the same with the layers of the tilemap! Thank you for your help, and sorry about my English. Link to comment Share on other sites More sharing options...
jmp909 Posted November 17, 2015 Share Posted November 17, 2015 Have a look at the p2 Tilemap exampleshttp://phaser.io/examples/v2/p2-physics/tilemaphttp://phaser.io/examples/v2/tilemaps/csv-map-with-p2 Link to comment Share on other sites More sharing options...
jmp909 Posted November 17, 2015 Share Posted November 17, 2015 Also note setImpactEvents is expensive... I believe onBeginContact is suitable for simpler needshttp://www.html5gamedevs.com/topic/5507-performance-question-onbegincontact-vs-impactevents/ Link to comment Share on other sites More sharing options...
Recommended Posts