rerun icon indicating copy to clipboard operation
rerun copied to clipboard

camera zoom via mouse wheel should change should slow down even more when already zoomed in very far

Open Wumpf opened this issue 2 years ago • 1 comments

The smaller the camera distance, the smaller the orbit camera movement via scroll wheel should be (3d space view) This is already the case, but it's often still hard to accurately zoom in.

Demonstration of problem on Linux:

https://user-images.githubusercontent.com/3312232/217645337-4c45cc65-37d3-45c3-88f4-f379b30e2916.mov

Wumpf avatar Jan 27 '23 16:01 Wumpf

This is very painful and makes the colmap demo nearly unusable on systems that only have a mouse with discrete zoom steps.

This is a single zoom "step" for me at the moment. I have no way to zoom to a level between "too far out" and "too close in."

jleibs avatar Feb 08 '23 20:02 jleibs

Maybe related:

  • https://github.com/emilk/egui/issues/2718

emilk avatar Feb 28 '23 21:02 emilk

This has gotten somewhat better on native recently, but it's noticeably much much worse on web.

jleibs avatar Mar 21 '23 00:03 jleibs

This is still quite broken on web. Here's video of scrolling a single step with scroll-wheel on linux.

https://github.com/rerun-io/rerun/assets/3312232/8206549f-f2b6-4294-8f74-879d4929b3a5

jleibs avatar Jun 12 '23 21:06 jleibs

Here it is on Web on my Mac, scrolling one mouse step at a time (on my mouse):

scroll-step-web

It is pretty worrying that the wheel event acts so differently on different platforms. The eframe code handling this is platform agnostic:

https://github.com/emilk/egui/blob/073f49682da20828dbd118f1d97e14a2b3879631/crates/eframe/src/web/events.rs#L390-L438

Btw, why isn't the scroll smoothed @Wumpf? I know you added code for that, and if I scroll faster I get the smoothed behavior, but @jleibs doesn't. Perhaps he get many duplicates of the wheel events?

This is what I see under the "Inspection -> Input" panel in egui.rs when I scroll very quickly with a mouse wheel:

IMG_5224

Here I get eight scroll lines in one go. If I scroll slower I only get one scroll line at a time (as expected).

If Linux is misbehaving we could consider special treatment on Linux, and just count the number of wheel events and ignore their magnitude (on Linux).

emilk avatar Jun 13 '23 06:06 emilk

Please try https://github.com/rerun-io/rerun/pull/4668 on Linux and see how zooming feels these days

emilk avatar Jan 04 '24 08:01 emilk

done!

Wumpf avatar Jan 04 '24 12:01 Wumpf

The above issues are still present:

This is one wheel click forward/backward:

https://github.com/rerun-io/rerun/assets/3312232/0ffd790a-31de-4645-87c0-bf4ca3a78147

jleibs avatar Jan 04 '24 18:01 jleibs

Looks like for me the mouse wheel result is 180 but in units of Point instead of units of Line.

image

jleibs avatar Jan 04 '24 18:01 jleibs

egui.rs also gives me points but shows +/- 13 for a single notch on the scroll wheel

Wumpf avatar Jan 09 '24 10:01 Wumpf