summaryrefslogtreecommitdiff
path: root/playground/src/main.rs
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2024-12-15 22:59:42 +0100
committereug-vs <eugene@eug-vs.xyz>2024-12-15 22:59:42 +0100
commitf502048ade181deeef3bb6c4b0bab1cd6852ce03 (patch)
tree86fd9c7ae17fe38809a6d505b5dda95a18443f10 /playground/src/main.rs
parentb19a505ff82cc959ec1f3a839e4eacffd21cc2e8 (diff)
downloadparticle-physics-f502048ade181deeef3bb6c4b0bab1cd6852ce03.tar.gz
feat: use much stiffer spring for mouse actions
Diffstat (limited to 'playground/src/main.rs')
-rw-r--r--playground/src/main.rs5
1 files changed, 3 insertions, 2 deletions
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,
}));
}