From 8b95cf8cc286be68d3f20d05aa8173e9dbbefa78 Mon Sep 17 00:00:00 2001 From: William Date: Sat, 18 Apr 2020 17:31:37 -0400 Subject: [PATCH] no more flying --- docs/assets/js/player/player.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/assets/js/player/player.js b/docs/assets/js/player/player.js index 67490a5..ed5eba7 100644 --- a/docs/assets/js/player/player.js +++ b/docs/assets/js/player/player.js @@ -37,7 +37,8 @@ Player.prototype.update = function() { // select if (this.shouldMoveLeg) { this.moveLeg(); - if(mousePress[0]) {// if (collidingWithWorld({ x: curLeg.x2, y: curLeg.y2, w: 4, h: 4 })) { + if(mousePress[0] && collidingWithWorld({x: curLeg.x2, y: curLeg.y2, w:8, h:8})) { + if (this.legSelected === "R") { this.leftLeg.angle += pi; } else {