ThatOpen / engine_components

MIT License
350 stars 134 forks source link

Unable to zoom back in after zooming out with an OrthoPerspectiveCamera #388

Closed Haval closed 4 months ago

Haval commented 6 months ago

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 βœ…

Zhangjc20 commented 6 months ago

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

AlexanderMelde commented 5 months ago

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

agviegas commented 4 months ago

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!