Recommended Physics Engine?

What Physics engine would you guys recommend? Rn I have been using Physijs but theres a lack of documentation (especially on the impulse forces). Is it worth trying pure ammo.js?

1 Like

Well, most official physics examples are based on ammo.js:

https://threejs.org/examples/?q=ammo

This code might make it easier to get started with three.js and ammo.js.

1 Like

For your reference

ammo . js , a port of the Bullet physics engine from C++ to JavaScript
Ammo.js still lack documentation .
To know more about it you can check on the bullet documentation : Bullet Documentation

1 Like

I have made a cool ammo.js based library. Check it out at
@enable3d/ammo-physics

3 Likes

I’ve used Physijs and Cannonjs,
I found cannonjs better performance.
They are both quite easy to use.
However, physics engines are not magic, you will need to manage your expectations. The more calculations made by the physics engines each render loop will affect performance.
Here are 2 examples I created using cannonjs.


https://sbcode.net/threejs/compounds-versus-convex-polyhedrons/

I also have physijs examples but I now use cannonjs first.
I’ll add the links if you want. They are for my vr projects, so you’ll need a vr headset to experience.

2 Likes

Something I don’t see too often that I’d like to suggest are the emscripten bindings for PhysX (https://www.npmjs.com/package/physx-js). I’ve been playing with that for the past 2 months and quite like it. While it is fully documented on the PhysX website, the documentation isn’t for js… Also there are some missing pieces in the bindings, but you can add your own bindings to fill in those missing pieces if you’re handy with C++

1 Like