I’ve created a very basic model in Blender 2.92.
It contains the basic types of meshes (Cone, Cube, Cylinder, Icosphere, Plane, Sphere & Torus). Each mesh also has its own ‘Collider’ mesh, which is either a Cube, Cylinder or Sphere.
Having exported & loaded ‘test.gltf’ into a Babylon.js scene, I’m using the Ammo.js plugin to drop spheres onto each mesh in the model. ‘ballOnCone’ is dropped onto the Cone mesh & so on.
I’m trying to follow the steps described here but, I’m having quite a few issues:
- PhysicsViewer is showing all ‘test.gltf’ impostors as boxes.
- Some impostors don’t seem to work - the sphere falls or rolls through or even gets stuck inside.
- The spheres don’t come to rest unless I ‘help them’, by scaling down their angular velocity.
Is this necessary or am I masking some other issue? They either roll (very VERY slowly) off the plane, or in the case of the 3 spheres against the long cylinder near the top, they sit there constantly jiggling!?
- When I try to
registerOnPhysicsCollideto display a collision counter for
firstBallI get an error in Ammo.js as soon as it collides with another impostor.
I’m new to Babylon & 3D in general, so hopefully I’m just missing something basic, but I’d really appreciate some help or advice.
I have been wondering whether I’d have more success if I created the collider meshes in Babylon.js rather than in Blender, but was unsure how feasible that would be, especially for more complex models.
I haven’t created a playground (yet), but I’m happy to do so, or post source code if it helps.
Thanks in advance!