Comments (4)
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.
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.
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.
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)
- Dolly to cursor does not maintain steady speed HOT 1
- Roll/tilt control HOT 1
- Can't zoom after switching between cameras HOT 10
- Cannot dispatch custom event HOT 4
- It would be nice to have setFov method with smooth transition HOT 2
- Transition updateCameraUp HOT 2
- Control functions skip frames when frameloop = demand HOT 3
- setFocalOffset -- How to keep the model always facing the screen HOT 2
- Use .isSphere instead of "instanceof Sphere" HOT 2
- The automated release is failing 🚨 HOT 1
- Can you add an "autoRotate" function, like OrbitControls in Threejs? HOT 2
- moveTo changes target incorrectly
- using "isSphere" requires three.js version compatibility bump to r160 HOT 3
- Collision detection is abnormal HOT 3
- Behavior similar to three.js Trackball Controls HOT 1
- Trackpad Zoom/Scroll so slow in Orthographic Camera HOT 1
- Invert Colliders HOT 4
- Truck/Controls Event Listener Disappears after Clicking Twice HOT 2
- Forward scroll slower than Backward scroll motion in Infinite Dolly mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camera-controls.