diff --git a/ship.js b/ship.js index 05c92c8..8924bf2 100644 --- a/ship.js +++ b/ship.js @@ -49,9 +49,9 @@ function Ship(pos, r) { this.hits = function(asteroid) { var vertices = [ - createVector(this.pos.x - this.r, this.pos.y - this.r), - createVector(this.pos.x - this.r, this.pos.y + this.r), - createVector(this.pos.x + this.r, this.pos.y + 0) + createVector(this.pos.x - 2/3 * this.r, this.pos.y - this.r), + createVector(this.pos.x - 2/3 * this.r, this.pos.y + this.r), + createVector(this.pos.x + 4/3 * this.r, this.pos.y + 0) ]; var asteroid_vertices = asteroid.vertices(); for(var i = 0; i < asteroid_vertices.length; i++) { @@ -83,7 +83,7 @@ function Ship(pos, r) { rotate(this.heading); fill(0); stroke(255); - triangle(-this.r, -this.r, -this.r, this.r, this.r, 0); + triangle(-2/3*this.r, -this.r, -2/3*this.r, this.r, 4/3*this.r, 0); if(this.accelMagnitude != 0) { translate(-this.r, 0);