Does anyone know how to incorporate third party physics libraries to Phaser 3

Hi,
I want to use Chipmunk.js with phaser 3. I have used Chipmunk js before with pixi.js. There I ran all the game code by moving physics bodies and rendered their corresponding sprites in every update cycle with pixi js.

I saw that Phaser 3 can use more than just one type of Physics library. (Arcade and Matter Physics are written inside Phaser Physics and Impact Physics library is used as a plugin).

I couldn’t understand how to integrate chipmunk.js code seamlessly with Phaser 3 as the other libraries have been integrated. Does anyone know how to integrate third party physics library like this to Phaser 3? Tips and Directions as to how to do so will be helpfull. Thanks.

I’ve not done it, but here’s an article/tutorial/code sample that uses Planck.js with Phaser 3 - https://www.emanueleferonato.com/2019/10/12/use-box2d-physics-in-your-phaser-3-projects-with-planck-js-javascript-physics-engine/

2 Likes

Probably you need to create a scene plugin, like ArcadePhysics.

1 Like