WaterMaterial thrown mesh error

Hello all, hope you doing good.

I’m trying to get the WaterMaterial work, but it doesn’t seem to. I’ve check all docs and bugs reports I found, but nothing.
I import it from @babylonjs/materials
I can create it with no problem, but when I call assign (such as: waterGround.material = myMaterMaterial) it says following error.

Well, I then try to create fire, since FireMaterial is in @babylonjs/materials
Same thing, can create but can’t assign:

I really don’t know what to do.
Thanks for help.

Please ensure you are using the same version of the materials package and the babylon core package ? I guess it might be your issue here.

1 Like

I don’t know.
I gonna start a new project just to try it. I’ll let you know how things going.

You difinitely right, it was versioning issue.
I was using es6 modules (not Babylonjs es6). So I now switched to webpack then using Babylonjs es6, and everything is gold.
Thanks for your help.

2 Likes