Closed renesimplylogic closed 6 months ago
Any ideas about this?
@xeolabs Do you have any idea about the question? Scrolling is annoying now. If you have any guidance how to improve scrolling, please let me know. Thanks in advance.
I'm experiencing the same issue.
This is by design. The movement speed automatically adjusts for the distance to the object under the pointer.
When the object is far away, movement is fast. As the object gets closer, movement speed slows down proportionately.
This aims to solve the problem of having a sensible speed for the scale of the space that the camera is traversing, so that it moves quickly in wide open spaces, but moves slowly in closed tight spaces.
When the pointer is not on an object, the movement needs to use the default zoom/dolly speed configured on the CameraControl.
Without this mechanism, a fixed default speed was often too slow for navigating open spaces between buildings, or too fast for navigating building interiors.
This mechanism was given a lot of consideration and is the best compromise we've been able to devise so far.
If you can think of any alternative or improved UX that allows to navigate open and closed spaces in this way, ie. without moving too fast or too slow for the scale of the enclosing environment, we're always open to suggestions or contributions on this.
Note that you can adjust the default dolly speed for mouse using mouseWheelDollyRate
, for when the pointer is not over an object.
However, what might help is if we added a dollyMinSpeed
property to CameraControl
, which would at least clamp the movement to a maximum rate.
mouseWheelDollyRate
also affects zoom when the pointer is over an object.
I've just found a trick.
It's possible to change mouseWheelDollyRate
to a higher value when the hover
event is triggered, and reduce it when the hoverOut
event is triggered.
mouseWheelDollyRate
also affects zoom when the pointer is over an object.
Perhaps there should be something like
pointerOffMouseWheelDollyRate
- the dolly speed whenever the mouse is not over an object, andpointerOverMouseWheelDollyRate
- the average or "baseline" dolly speed when the mouse is over an object, which is then scaled by the distance to the objectClosing this issue, since @AXONE-IO has a workaround.
Would be willing to accept a PR (see my comment above) if that's a useful idea to anyone.
I have issues with dollying/zooming on some XKT models. Primarily models that are converted from GLTF to XKT with the xeokit-convert library. IFC files that are converted to XKT are working fine.
My viewer has "followPointer" enabled. When I scroll with the mouse and I have the pointer on a entity/object zooming in and out is working, but the zoom steps are very large.
When I scroll on a empty space (no entity/object) then zooming is way too much. When zooming in, the whole model is gone. And when zooming out. The whole model is too small to see.
If I turn off "followPointer". Then scrolling is working ok, but I cannot dolly through objects then.
What can I do to debug the scrolling issues I have? Any ideas are welcome. Maybe it is the GLTF file that is not correctly configured but no idea.
Also see this example. What is doing exactly the same as the problems I have. Zooming in on the car is going ok. Zooming in on empty space is zooming too much.
https://xeokit.github.io/xeokit-sdk/examples/#loading_OBJ_SportsCar