Questions tagged [ammo.js]

ammo.js is a JavaScript port of the c++ Bullet physics engine.

66 questions
7
votes
1 answer

How can I realistically model a golf stroke with Bullet physics? (Live demo included)

Background I am playing with making a minigolf game using three.js and the ammo.js conversion of the Bullet Physics library but I am having some trouble getting the ball to move realistically. (I've put a demo at…
Peter de Rivaz
  • 33,126
  • 4
  • 46
  • 75
3
votes
1 answer

How do I use Ammo.btCompoundShape (JavaScript port of Bullet Physics)?

I'm using Ammo.js, a direct JavaScript port of C++ Bullet Physics. The unfortunate result being that the documentation is C++, not great reading if your languages are Python and JavaScript. I have the documentation for Ammo.btCompoundShape here but…
J.Todd
  • 707
  • 1
  • 12
  • 34
3
votes
1 answer

Ammo.js custom mesh collision with sphere

I'm trying to generate collisions for every object/mesh. They are all static and should collide with a ball/sphere, which is dynamic. My code looks like this: const transform = new Ammo.btTransform(); transform.setIdentity(); transform.setOrigin(new…
GTX
  • 727
  • 2
  • 13
  • 30
3
votes
2 answers

Rigid body (shape) in bullet/ammo.js from a mesh in three.js

I am using bullet/ammo.js with three.js. I have a 3d mesh and I want to use the exact shape for collision detection with a soft body. Is there a way I can create a 3d rigid body (in bullet) from a mesh (in three.js)? Here is an…
Łukasz Kidziński
  • 1,613
  • 11
  • 20
2
votes
1 answer

Ammo.js collision detection of GLTF model in A-frame

How to detect collision of sphere with gltf model and make the gltf model disappear from scene after the collision. The collision detection in my code works with collisions between spheres but not with gltf models.
jacobi1
  • 23
  • 3
2
votes
2 answers

Aframe ammo physics how to set bounciness or restitution?

I can't change the restitution (bounciness) either globally or on a per mesh basis when using ammo physics. So far I've included the libraries: