aframe-physics-system
aframe-physics-system copied to clipboard
ammo.js driver and build issues
I'm using the updated (17 days ago) version of ammo.js at (http://kripken.github.io/ammo.js/builds/ammo.wasm.js) and I'm getting the error
TypeError: this.physicsWorld.setForceUpdateAllAabbs is not a function
coming from https://cdn.rawgit.com/donmccurdy/aframe-physics-system/v4.0.1/dist/aframe-physics-system.min.js
If I use https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js I don't get that error but I get another error related to btRaycastVehicle not being a constructor. I'm guessing the mozilla build doesn't port over those functions.
Any help would be much appreciated and I'm happy to provide more code for context if needed!
/cc @InfiniteLee any idea on this?
Just to note, I commented out the this.physicsWorld.setForceUpdateAllAabbs()
function in the startup function and everything seems to be working now. I didn't see any function setForceUpdateAllAabbs()
in the ammo.js idl
https://mixedreality.mozilla.org/ammo.js/builds/ammo.wasm.js exports only the specific functions used by the ammo-driver
which includes some specific ones that http://kripken.github.io/ammo.js/builds/ammo.wasm.js does not export by default. I would recommended you either fork your own version of ammo.js with the specific functions you want, or you open a PR to have those functions added to https://github.com/kripken/ammo.js/ .
https://github.com/mozillareality/ammo.js will probably not add additional functions in order to keep the build size small, unless specific functions are needed for future updates.