[SOLVED] Possible to use cannon-es with PlayCanvas?


Is it possible to use cannon-es (the forked and maintained version of cannon.js) with playcanvas? I cannot get the build (cannon-es.js) to work in the playcanvas editor.


Hi @nasjarta,

PlayCanvas uses Ammo.js for physics.

If you’d like to use a different physics library you will need to write the integration yourself (it’s doable but advanced).

Here is a project, that can server as a starting point, that uses regular cannon.js by @yaustar: PlayCanvas 3D HTML5 Game Engine

1 Like

I’ve just updated the project to use a browserified version of cannon-es: https://forum.playcanvas.com/t/cannon-es-js-3d-physics-integration/28633


Woow thanks @yaustar that’s a really helpful project.

I actually did manage to implement basic cannonjs to playcanvas (creating the physics world/timestep, basic collision bodies like box and sphere, contact materials) but had trouble getting the cannon-es build to work.

This project solves everything thanks :grinning:

1 Like