Shake in cesium-babylonjs

I am follow it , but when I move camera, the mesh in bablylon is shaking.

You can try to use the useHighPrecisionMatrix:true option when creating the engine and see if that helps (EngineOptions | Babylon.js Documentation).

2 Likes

Hi All,
the solution to se useHighPrecisionMatrix: true is not enought when you have very small models and the level of zoom is too high. This is due to the fact that Babylon Matrix class uses Float32 for internal calculations instead of Float64 and when in the sample of integration code the view matrix is decomposed we loose precision.
I found a simple work around getting the transform info directly to Cesiumjs Matrix4:

let cesiumTransform = new Cesium.Cartesian3(0, 0, 0);
Cesium.Matrix4.getTranslation(civm, cesiumTransform);
transform =cart2vec(cesiumTransform);

This way the 3d model in Babylonjs view doesn’t shake anymore.