Coder Social home page Coder Social logo

Comments (4)

yomotsu avatar yomotsu commented on June 12, 2024

Would you mind providing a simplified working example on CodeSandbox or a similar platform to reproduce the problem?

FYI: you must set minDistance to not a small value if you wish to enable infinityDolly

from camera-controls.

tmuguet avatar tmuguet commented on June 12, 2024

Hi @yomotsu ,

I'm working with @sguimmara. I reproduced this issue with an example derived from the infinity-dolly example: https://codepen.io/tmuguet/pen/poBXyyd .
In this example, if you try to dolly-in in the top-left or top-right corner, you end up getting stuck, whether infinite dolly is enabled or not actually.

from camera-controls.

yomotsu avatar yomotsu commented on June 12, 2024

Thank you for providing the demo.

I believe the minDistance value is too small relative to the scene's scale.
For instance, a value of 100 is nearly insignificant when considering camera positions such as camera.position.set(59861, -543453, 600000) and other similar settings.

Could you try using a larger number for the minDistance value?

from camera-controls.

tmuguet avatar tmuguet commented on June 12, 2024

Thanks for your prompt answer!

Setting a larger number (like 10000) fixes this issue, but it comes with some side-effects:

  • when we get close to the plane (i.e. our map), the value is obviously too large, so we easily traverse the plane we're targeting (that's why minDistance was initially set to such a low value),
  • when we hit that value, setOrbitPoint (which we bind on right-click) makes the camera jump.

We've tried using setBoundary to bound the target, but it also introduces some other side-effects.

I believe there's no "one value fits all uses-cases". I'll try to have an adaptative minDistance then.

from camera-controls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.