Large coordinates

Hello,

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, {
      useHighPrecisionFloats: true,
      preserveDrawingBuffer: true,
      stencil: 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

Hi @Romain ,

Welcome to the forum :slight_smile:

Would you be able to reproduce that on the playground (playground.babylonjs.com) so we can see what you are seeing?

Thanks for your welcome @RaananW, I’m glad to join your forum :slight_smile:

I’m work with an IFC file so, It’s difficult for me to reproduce that on the playground…Here is my project repository : https://github.com/romain-becker/BABYLON-IFC.

I have also try something like this https://playground.babylonjs.com/#73TFGX#2

Hello! Can you talk a bit more about your project, what do you intend to make? I don’t have much experience with large scenarios, but I’m sure someone on the forum can help you. :smiley: @imerso 's very cool template might also be of help! Floating Origin Template for BJS 5.x - Demos and projects - Babylon.js (babylonjs.com)

4 Likes

Hello just checking in, do you still have issues? @Romain

Hello @carolhmj sorry for the delay, this solution work’s fine, thanks a lot ! :slight_smile:

1 Like