|
@@ -1781,8 +1781,9 @@ export default {
|
|
|
let dir = this.pos.x > this.canvas.width/2 ? 1 : -1; // get the direction to the closest side
|
|
|
let dist = (dir < 0 ? this.pos.x : this.canvas.width - this.pos.x); // get the distance from the side
|
|
|
let ori_pos = {x:this.canvas.width/2, y:this.body.position.y};
|
|
|
- let x_force = Math.pow(dist/700,10) * dir;
|
|
|
+ let x_force = Math.pow(dist/700,100) * dir;
|
|
|
|
|
|
+
|
|
|
Matter.Body.applyForce(
|
|
|
this.body,
|
|
|
ori_pos,
|