From 6eae7cd16e0d95b862da17f25c74a8b29c6e73af Mon Sep 17 00:00:00 2001 From: Nathan van der Kamp Date: Mon, 18 Nov 2024 10:14:20 +0100 Subject: [PATCH] Fix boid speed depending on framerate --- js/boid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/boid.js b/js/boid.js index 411f82b..0756087 100644 --- a/js/boid.js +++ b/js/boid.js @@ -139,7 +139,7 @@ class Boid extends V2D { } this.vel.max(opt.maxSpeed); - this.add(this.vel); + this.sclAdd(this.vel, g.delta); if (opt.bounce) { let ran = false;