Yo @Deltakosh and @trevordev … Hey guys… I think we (the babylonjs dev team) should create and maintain a fork of Ammo.js.
The Ammo js guy at (Kripken) main goal is to keep the base source build (like the one we are housing) as plain as possible. And our build is such a build. It does not support the main Bullet Physics Contact… So @trevordev ONLY option for detecting collisions is check every physics world execution step and checking and double checking contact pairs… Which does work… but this setup you ALWAYS have to know and reference ALL other impostors you want to detect collisions for… That kinda sucks… You should really use the Native Bullet Physics Contact Callback System. I made the neccessary changes to the PR #251 take a look at the details i made for the C++ source (Added function handlers to support contact callbacks) the Ammo.idl and the make.py to support teh emscriptem addFunction the only way you can wrap a javascript function as a pointer and pass as a integer (void*)
Works beautiful… and i now have an awesome pseudo Native Collision System for my Scene Manager Extension.
Kripen MAY or MAYNOT commit my PR… and if he does… WE STILL NEED to build a version of the Ammo.js with Native Function Pointer support. My PR will let you do this by simply calling
python make.py add_func
So we need a Babylon FORK of Ammo.js where can:
A: Make any needed changes to support FEATURES for BabylonJS Physics (like my PR #251)
B: Build our own versions of ammo.js using build switches like add_func
Now i have a fork that i made changes and build the dist for updated ammo.js and ammo.wasm.js
We can use that or you can add a fork to the BabylonJS organization…
I dont care which… But we need to UPDATE the ammo.js from our dist folder on github…
What do you guys think ???