Best way to implement/import AmmoJS physics engine?

Hello,
I’m trying to implement the Ammo JS physics engine, but I’m not sure how to properly import and implement the engine.
Following the docs it looks like we just ‘activate’ it within BabylonJs with scene.enablePhysics() and passing in an instance of Ammo. However, it can’t find ‘Ammo’.

I tried using this npm package (https://www.npmjs.com/package/ammo.js) but it’s way too old - 5 years and doesn’t seem to work either.

Any suggestions? Do I have to install any specific package for it to work? If so, can you provide a link to it? I couldn’t find much information on this regard.

Thanks in advance.

1 Like

This could help Babylon.js ES6 support with Tree Shaking | Babylon.js Documentation

You should be using kripken/ammo I guess :slight_smile:

1 Like

Oh wow! I didn’t see that page!
Doing it as written there makes it work! Thank you so much for the reference!
P.S.: This setup (in this docs page) could probably be linked in the Physics page?

1 Like