engine_components icon indicating copy to clipboard operation
engine_components copied to clipboard

Unable to zoom back in after zooming out with an OrthoPerspectiveCamera

Open Haval opened this issue 1 year ago • 1 comments

Describe the bug 📝

If I zoom out to a far distance using an OrthoPerspectiveCamera and then when I attempt to zoom back in the camera does not zoom back in correctly and instead remains far away from the object in view.

This can also be seen in the documentation tutorial https://docs.thatopen.com/Tutorials/OrthoPerspectiveCamera

Reproduction ▶️

https://docs.thatopen.com/Tutorials/OrthoPerspectiveCamera

Steps to reproduce 🔢

No response

System Info 💻

System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900HK
    Memory: 27.22 GB / 31.19 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.1/bin/npm
  npmPackages:
    openbim-components: ^1.3.4 => 1.3.4

Browsers: Chrome

Used Package Manager 📦

npm

Error Trace/Logs 📃

No response

Validations ✅

  • [X] Read the docs.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
  • [X] Check that this is a concrete bug. For Q&A join our Community.
  • [X] The provided reproduction is a minimal reproducible example of the bug.

Haval avatar May 15 '24 19:05 Haval

I have a similar problem too. if i zoom out to a far distance then i can't zoom out further, but if i zooming in is still possible, it seems that the further you zoom out, the less sensitive zooming becomes. this condition occurs only when the object is far away from the original position of camera

Zhangjc20 avatar May 23 '24 05:05 Zhangjc20

The demo to reproduce the problem has moved to https://docs.thatopen.com/Tutorials/Components/Core/OrthoPerspectiveCamera but the issue still persists.

AlexanderMelde avatar Jun 03 '24 09:06 AlexanderMelde

Hey, for the camera we just use yomotsu's camera controls. They are available in the controls property of all our cameras. We just use those controls without doing anything else, so there's not much we can do 🤔 maybe you can report that error in their library? Alternatively, you can provide a feature to zoom back to the origin and fit all the BIM models in the camera, like shown in this tutorial. If there's something else we can do, please let us know! Closing this issue for now, as it seems something related to yomotsu's library. Cheers!

agviegas avatar Jul 04 '24 12:07 agviegas