From f5caf8f9643c2e7d10afb4a83f980b1e8659eae7 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 27 Jan 2025 16:05:48 +0100 Subject: faster cursor centering --- client/src/window.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/src/window.rs b/client/src/window.rs index 665aa01..919d05e 100644 --- a/client/src/window.rs +++ b/client/src/window.rs @@ -73,10 +73,10 @@ impl ApplicationHandler for WindowState { sta.renderer.surface_configuration.height as f32, ); let center = size / 2.; - let dt = 0.008_f32; + let dt = 0.03_f32; let h = center + (sta.input_state.cursor_pos - center) * (-dt).exp(); sta.input_state.cursor_pos = h; - let center = center.distance(sta.input_state.cursor_pos) < 5.; + let center = center.distance(sta.input_state.cursor_pos) < 10.; if self.center != center { self.center = center; win.set_cursor(if center { -- cgit v1.2.3-70-g09d2