Merge pull request #13 from rsninja722/climbing

no more flying
This commit is contained in:
rsninja722 2020-04-18 19:15:28 -04:00 committed by GitHub
commit 5494304754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {