Search code examples
autodesk-forgeautodesk-viewer

Is it possible to change the zoom factor of the fitToVIew function?


https://autodeskviewer.com/viewers/latest/docs/Autodesk.Viewing.Viewer3D.html#fitToView

I want to change the zoom factor because it's so close to the object. Are there any workaround to this? There doesn't seem to be a parameter regarding that.


Solution

  • Unfortunately, it's not changeable, but you could get the object bounding box and scale it to a proper size that matches your desired camera location.

    See also: How to control the distance between the page and the component with FitToView?