3D Model from GLTF scales up when zooming out

Hi!

I have a 3D Model loaded from entities.add but whenever I try to zoom in out the viewer, it also scales up/down the model I just added. Is it possible that it will follow the original size of the model? Thanks!

viewer.entities.add({
      show: true,
      name: url,
      position,
      orientation,
      model: {
        uri: url,
        minimumPixelSize: 64,
        maximumScale: 500,
      },
 });

Hi @iramgelb,

The model is scaling as you zoom out because you have a minimumPixelSize defined. minimumPixelSize determines the minimum size of the model on the screen. So even when you zoom out very far, the model will scale up so it takes up that amount of pixels on the screen.

While you can control how much the model scales with maximumScale, you can disable this entirely by removing minimumPixelSize from the constructor.

2 Likes