We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cc984a commit 74bf6e0Copy full SHA for 74bf6e0
js/modules/Physics.js
@@ -41,7 +41,8 @@ export default class Physics {
41
* @arg {Celestial} b
42
* @returns {boolean}
43
*/
44
- (a, b) => a.position.vectorTo(b.position).magnitude < a.size + b.size,
+ (a, b) =>
45
+ a.position.vectorTo(b.position).magnitude < (a.size + b.size) / 2,
46
},
47
};
48
/**
@@ -134,8 +135,8 @@ export default class Physics {
134
135
}
136
/** Calculate the physics for objects in the scene and apply to model. */
137
step() {
138
+ this.updateCollisions();
139
this.updateVelocities();
140
this.updatePositions();
- this.updateCollisions();
141
142
0 commit comments