Z fighting question

Hi, I have a mesh in a playground that for some reason has some intense z-fighting on the floor plane of the mesh. I am wondering if anyone has any ideas why this might be happening or how to fix it – thanks!

Hi @aklaus, the createDefaulEnvironment function also creates a floor mesh (you can see it in the inspector), that’s what it’s fighting with.

To not let it create a floor, you can do:

const environment = scene.createDefaultEnvironment({
     createGround: false
});

https://www.babylonjs-playground.com/#NGS9AU#136

3 Likes

Thanks, that was super helpful!

1 Like