From f502048ade181deeef3bb6c4b0bab1cd6852ce03 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 15 Dec 2024 22:59:42 +0100 Subject: feat: use much stiffer spring for mouse actions --- playground/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'playground/src/main.rs') diff --git a/playground/src/main.rs b/playground/src/main.rs index 754da70..0ef91ce 100644 --- a/playground/src/main.rs +++ b/playground/src/main.rs @@ -106,11 +106,12 @@ fn main() { let world_mouse = camera.screen_space_to_world(screen_space); system.particles[mouse_particle_id].position = world_mouse; + system.particles[mouse_particle_id].velocity = Vector::zeros(); system.forces.push(Box::new(Spring { particle_ids: [mouse_particle_id, particle_id], - spring_constant: 0.99, - damping_constant: 0.99, + spring_constant: 25.0, + damping_constant: 10.00, rest_length: 1.0, })); } -- cgit v1.2.3