diff options
author | eug-vs <eugene@eug-vs.xyz> | 2024-12-15 22:59:42 +0100 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2024-12-15 22:59:42 +0100 |
commit | f502048ade181deeef3bb6c4b0bab1cd6852ce03 (patch) | |
tree | 86fd9c7ae17fe38809a6d505b5dda95a18443f10 /playground/src/main.rs | |
parent | b19a505ff82cc959ec1f3a839e4eacffd21cc2e8 (diff) | |
download | particle-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.rs | 5 |
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, })); } |