Update scroll sensitivity for discrete mouse wheels
This commit is contained in:
parent
bef0b66ee1
commit
b42563a94d
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ pub fn zoom_camera(
|
||||||
return Err("Default camera was not orthographic".into());
|
return Err("Default camera was not orthographic".into());
|
||||||
};
|
};
|
||||||
let scroll_type_multiplier = match scroll.unit {
|
let scroll_type_multiplier = match scroll.unit {
|
||||||
MouseScrollUnit::Line => 0.01,
|
MouseScrollUnit::Line => 0.1,
|
||||||
MouseScrollUnit::Pixel => 0.001,
|
MouseScrollUnit::Pixel => 0.001,
|
||||||
};
|
};
|
||||||
projection.scale = (projection.scale - scroll.delta.y * scroll_type_multiplier).clamp(0.1, 2.5);
|
projection.scale = (projection.scale - scroll.delta.y * scroll_type_multiplier).clamp(0.1, 2.5);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue