'Large coordinates in BabylonJS

I am developping an app with BabylonJS and I want to set up my camera at large coordinates but my object shapes are distored when I move with my mouse but not with arrows keys…Can have you a solution for this problem ?

Here is my engine :

var engine = new BABYLON.Engine(canvas, true, {
  preserveDrawingBuffer: true,
  stencil: true,
  useHighPrecisionFloats: true,
});

My camera set-up :

 var camera = new BABYLON.FreeCamera(
    'camera1',
    new BABYLON.Vector3(
      736615.502910341,
      65.0622981253458,
      6822191.60884546
    ),
    scene
  );

  camera.setTarget(BABYLON.Vector3.Zero());
  camera.attachControl(canvas, false);

I have try :

scene.activeCamera.maxZ

And :

engine.useReverseDepthBuffer = true

But nothing work…

Thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source