Qqwy Posted July 27, 2014 Share Posted July 27, 2014 Hello there, I'm teaching myself Phaser while working on a small platformer. What I'm wondering about: Say I use a tileset such as this one: Simple AABB collision using Arcade on the tile map is shown in this example: http://examples.phaser.io/_site/view_full.html?d=tilemaps&f=map+collide.js&t=map%20collide However, as in this tile map there are many slanted/sloped tiles. This is where using just Arcade falls apart.What is the proper way to let the player collide with these slanted tiles in Phaser? I'm not scared to get my hands dirty with writing some custom code, but if there's a way to do it already, I'd like to know. Thank you, Qqwy Link to comment Share on other sites More sharing options...
lewster32 Posted July 27, 2014 Share Posted July 27, 2014 There isn't an inbuilt way to do this with Arcade (this is one of the reasons Arcade is so fast) however both P2 and Ninja support non-rectangular collisions. Link to comment Share on other sites More sharing options...
Qqwy Posted July 28, 2014 Author Share Posted July 28, 2014 Thanks a lot for your reply! When I browsed the documentation and looked more into Ninja, I started drooling once I saw the Phaser.Physics.Ninja.Tile class...awesome =3. Now only to find out how amend to the code in Phaser.Physics.Ninja.AABB.js I can make 4x1 (and 1x4) tile slopes as well. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts