BoundingBox problem and Refreshing bounding box

Hello everyone

I have built custom mesh with the aid of triangles, and there is a problem in my design in rotation and zoom in/out. I mean when I rotate or zoom in ( or out) some of my triangles vanished. I want to know how can I refresh Bounding Box, and also how can I solve this problem

the following url is my PG ( with the tiny part of my geoJson ) and when you rotate it you can see the problem:

and this is my final problem:

I also used the following code to fix it but the problem doesn’t fix:
var vis = 10000; // visibility scaling
customMeshArr[i]._boundingInfo = new BABYLON.BoundingInfo(new BABYLON.Vector3(-vis, -vis, -vis), new BABYLON.Vector3(vis, vis, vis));

Because your mesh is really large you are losing depth precision
try to set camera.minZ = 10 to fix the precision issue

1 Like

I set the camera.minZ = 10 but again when I ZOOM IN and OUT some triangles vanished.

that works for me:

1 Like

when I rotate it or zoom out more triangles vanished.

chrome-capture (1)

and also this is the tiny part of my actual model.

The default value for camera.maxZ is 10000 and you are setting the radius to 10000 so it means you are at the far plane limit.

Set camera.maxZ to 100000 for eg.

1 Like

Thank you so much . :pray:t2: :pray:t2: :pray:t2: :pray:t2: