SolidParticleSystem: cannot use structured mesh as particle

Hi all!

Documentation of SolidParticleSystem.addShape() claimes that any Mesh object can be used as particle.

But it seems that’s not true. https://www.babylonjs-playground.com/#WCDZS#199

A Mesh constructed with child-meshes leads to a runtime error:

object null is not iterable (cannot read property Symbol(Symbol.iterator))
at Function.from ()
at e.addShape (babylon.js:16)

Is the documentation wrong? Am I doing something wrong? Is it a bug?
Is there a way to use any kind of Mesh?

Thank you,

. J

To be entirely specific the docs could say

Any non empty mesh can be used as a particle, however it is only the mesh itself that will be used as a particle not any children should they exist.

https://www.babylonjs-playground.com/#WCDZS#200 non empty mesh with children

2 Likes