kenshm Posted August 7, 2015 Share Posted August 7, 2015 Hi,(I apologize in advance for my bad English. I'm from Switzerland.) I recently bought this plugin : http://www.phaser.io/news/2015/04/virtual-joystick-plugin-released The goal is to control a ship in space with the joystick above.Everything works fine but the problem is that my ship could get out of the world. I'd like to know how to block it and prevent it from leaving the background / canvas.I used the arcade physics. Despite the examples available here, I did not succeed.Can you help me, please ?PS : Is it possible to use several collisions system in the same phaser game (example : arcade + p2) ?Best regards,Kenshimdev Link to comment Share on other sites More sharing options...
Skeptron Posted August 7, 2015 Share Posted August 7, 2015 Did you use collideWorldBounds on your sprite? And no I don't think you can use multiple physics engine within a single game : but I'm pretty sure P2 wraps all Arcade features, plus some others. Link to comment Share on other sites More sharing options...
Recommended Posts