Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vehicle physics with ammo #53

Open
vincentfretin opened this issue Nov 19, 2023 · 2 comments
Open

Vehicle physics with ammo #53

vincentfretin opened this issue Nov 19, 2023 · 2 comments

Comments

@vincentfretin
Copy link
Member

I started using ammo vehicle physics in aframe directly from https://github.com/kripken/ammo.js but not using aframe-physics-system
in this experiment https://github.com/c-frame/aframe-racing-game
I didn't think yet how to use it with an existing scene with aframe-physics-system ammo. For now I just did a simple conversion in an aframe component of the kripken's demo. If someone have any thought about it, they can contribute to the discussion.

FYI the MozillaReality ammo build we use in the examples in aframe-physics-system doesn't have vehicle physics. You need the latest build from kripken's repo https://cdn.jsdelivr.net/gh/kripken/ammo.js@8f8b7187ef74994093318645e5e96b11d982688a/builds/ammo.wasm.js
I have no idea if there is incompatibilities or not using the latest build with aframe-physics-system.

@enzofrancescaHM
Copy link

enzofrancescaHM commented Jun 21, 2024

I managed to mix an existing scene with a vehicle example, everything works properly if using the wasm you provided, but there is an error complaining of the lack of the function setForceUpdateAllAabbs(). I've commented out the only line using that in the aframe-physics-system and now it is ok, but I don't understand why this error, maybe this is related to
n5ro#130

@vincentfretin
Copy link
Member Author

setForceUpdateAllAabbs is indeed in https://cdn.jsdelivr.net/gh/MozillaReality/ammo.js@8bbc0ea/builds/ammo.wasm.js but not in the latest build https://cdn.jsdelivr.net/gh/kripken/ammo.js@8f8b7187ef74994093318645e5e96b11d982688a/builds/ammo.wasm.js
In https://github.com/kripken/ammo.js/blob/1ed8b58c7058a5f697f2642ceef8ee20fdd55e10/bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.h#L515 setForceUpdateAllAabbs seems to still exists there but not sure what are exposed in the wasm build from that file and what changed between the mozilla build and the latest kripken build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants