Imported object as Physics SphereImpostor

Hello, when I import my own 3D sphere object and try to apply Physics SphereImpostor, the simulation does not work. But when I use balls created directly in Babylon.js, as in the examples on the playground - it works. Where can the problem be?

Error: “abort(OOM). Build with -s ASSERTIONS=1 for more info.”
at abort (https://preview.babylonjs.com/ammo.js:27:256570)
at abortOnCannotGrowMemory (https://preview.babylonjs.com/ammo.js:10:51074)
at _emscripten_resize_heap (https://preview.babylonjs.com/ammo.js:10:51135)
at _o (https://preview.babylonjs.com/ammo.js:17:175259)
at Zb (https://preview.babylonjs.com/ammo.js:18:39562)
at Tc (https://preview.babylonjs.com/ammo.js:19:165972)
at Ue (https://preview.babylonjs.com/ammo.js:15:28766)
at Ax (https://preview.babylonjs.com/ammo.js:21:11561)
at btBvhTriangleMeshShape (https://preview.babylonjs.com/ammo.js:27:596936)
at e._createShape (https://preview.babylonjs.com/babylon.js:16:1932075)
at e.generatePhysicsBody (https://preview.babylonjs.com/babylon.js:16:1921493)
at e.addImpostor (https://preview.babylonjs.com/babylon.js:16:1119048)
at e._init (https://preview.babylonjs.com/babylon.js:16:453632)
at e (https://preview.babylonjs.com/babylon.js:16:450647)

Adding @Cedric our Ammo king.

Not sure why exactly that wouldn’t work. Do you have a playground you can point us to to help troubleshoot?

You could also try the mesh imposter and see if that works?

Hi @Johny_Mickey

It looks like Ammojs crashes when building the acceleration structure for a triangle mesh. Are you sure you set the impostor to be a sphere? Also, how many triangles do you have in your sphere?

2 Likes