-
-
Notifications
You must be signed in to change notification settings - Fork 278
Description
Describe the bug
When applying controls.setOrbitPoint, the model shakes heavily during rotation. After finishing the rotation with setOrbitPoint, zoom starts behaving unpredictably and the model is easily lost in space.
Could you advise whether this is a bug or if it can be configured to work properly?
setOrbitPoint.mp4



To Reproduce
Steps to reproduce the behavior:
Use the example “click to set orbit point”.
-
Add these lines — with them the shaking is clearly visible. Also, for my 3D CAD editor I want to use 0 values for these parameters.
cameraControls.dollyToCursor = true;
cameraControls.smoothTime = 0;
cameraControls.draggingSmoothTime = 0; -
Right now you can only notice the shaking. dollyToCursor works well after using setOrbitPoint, but that’s because a PerspectiveCamera is being used. In my project I use an OrthographicCamera.
-
Switch to OrthographicCamera:
const camera = new THREE.OrthographicCamera( width / -200, width / 200, height / 200, height / -200, 1, 1000);
-
Disable CameraControls.ACTION.OFFSET. If you use this, then dollyToCursor doesn’t work with OrthographicCamera.
-
If you rotate the model, the shaking is visible and dollyToCursor stops working as it should.
using-setOrbitPoint-2.mp4
Code
Live example
No response
Expected behavior
Smooth rotation and normal (expected) zoom behavior after rotation.
Screenshots or Video
No response
Device
No response
OS
No response
Browser
No response