From 3149c01bc11011babf0486977f5266a39f0abc43 Mon Sep 17 00:00:00 2001 From: jonathan santis Date: Wed, 27 Nov 2024 13:52:57 +0100 Subject: [PATCH] asdf --- src/main.zig | 12 ++++++------ zig-out/bin/raylib-test | Bin 4960464 -> 4960464 bytes 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.zig b/src/main.zig index 8de5caa..9465582 100644 --- a/src/main.zig +++ b/src/main.zig @@ -83,9 +83,9 @@ const Particle = struct { self.velocity.a.y += val; } pub fn applyForce(self : *Self,vec : pr.Vec) void { - self.velocity.a.x += vec.a.x * 0.5; - self.velocity.a.y += vec.a.y * 0.5; - self.velocity.a.z += vec.a.z; + self.acceleration.a.x += vec.a.x * 0.5; + self.acceleration.a.y += vec.a.y * 0.5; + self.acceleration.a.z += vec.a.z; } }; @@ -135,7 +135,7 @@ const Emitter = struct if(p.show == 1) { - p.applyGravity(0); + p.applyGravity(2); p.applyForce(att.attract(p.*)); p.applyForce(att2.attract(p.*)); p.update(); @@ -157,8 +157,8 @@ const Attractor = struct var vec = self.vec.sub(particle.position); if( vec.a.x != 0 and vec.a.y != 0) { - vec.a.x = vec.a.x/20; - vec.a.y = vec.a.y/20; + vec.a.x = vec.a.x/200; + vec.a.y = vec.a.y/200; } return vec; } diff --git a/zig-out/bin/raylib-test b/zig-out/bin/raylib-test index aaa4d08d5bd95c068e65099330b410778e378e9f..cf2e6cd6b3df59d783584bc9afe924fbf35076a9 100755 GIT binary patch delta 6000 zcmZWtcR&=^^Jn(%INEV=C*1CVu*ZQQs1&g)Rum};A_0ZiYf!;Puz&>t6^tP27<>JS zv5~LkCANTIjSBWg>;-F7P*F5|XTjtb`Ta5bcHU=Z-n^Z8@6Fq?ySunDqJootd1w5b zxb!^u|$+H#DP6lPAlvS#26v{!>wH2uyWF|pbQL}@x0?UFH zq>rhstqod~axG|4EB`SB|5gVduJ4|DtzvP&~CWlil7Kbod*;ew+Xc6nP{sUB2RskRL~Nqz^OktSJ< z?ZC2Qf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