fix not init bug with attractors

This commit is contained in:
jonathan santis 2024-11-28 15:06:25 +01:00
parent 774f9ba91a
commit 232f3c00d3
2 changed files with 2 additions and 2 deletions

View File

@ -158,8 +158,8 @@ const Attractor = struct {
const distance = self.vec.sub(particle.position); const distance = self.vec.sub(particle.position);
var force: pr.Vec = undefined; var force: pr.Vec = undefined;
if (distance.a.x != 0 and distance.a.y != 0) { if (distance.a.x != 0 and distance.a.y != 0) {
force.a.x = distance.a.x / 100; force.a.x = distance.a.x / 300;
force.a.y = distance.a.y / 100; force.a.y = distance.a.y / 300;
force.a.z = 0; force.a.z = 0;
} }
return force; return force;

Binary file not shown.