diff --git a/src/main.zig b/src/main.zig index 52ac357..a0b04ee 100644 --- a/src/main.zig +++ b/src/main.zig @@ -124,6 +124,7 @@ const Emitter = struct var posx : i32 = 0; var posy : i32 = 0; const att : Attractor = .{.vec = .{.a=.{.x=200,.y=200,.z=0}}}; + const att2 : Attractor = .{.vec = .{.a=.{.x=400,.y=400,.z=0}}}; att.draw(); for (self.particles) |*p| { @@ -132,6 +133,7 @@ const Emitter = struct p.update(); p.applyGravity(0); p.applyForce(att.attract(p.*)); + p.applyForce(att2.attract(p.*)); posx = @intFromFloat(screenWidth / 2 + p.position.a.x); posy = @intFromFloat(screenHeight / 2 + p.position.a.y); diff --git a/zig-out/bin/raylib-test b/zig-out/bin/raylib-test index 22e13ba..cdf03d1 100755 Binary files a/zig-out/bin/raylib-test and b/zig-out/bin/raylib-test differ