fix not init bug with attractors
This commit is contained in:
parent
232f3c00d3
commit
009bb10175
@ -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 / 300;
|
force.a.x = distance.a.x / 1000;
|
||||||
force.a.y = distance.a.y / 300;
|
force.a.y = distance.a.y / 1000;
|
||||||
force.a.z = 0;
|
force.a.z = 0;
|
||||||
}
|
}
|
||||||
return force;
|
return force;
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user