Revert "added former and current position"
This reverts commit 8afd36ba77
This commit is contained in:
@@ -93,9 +93,8 @@ function shoot(directionX, directionY) {
|
|||||||
circle(projectile.x, projectile.y, projSize);
|
circle(projectile.x, projectile.y, projSize);
|
||||||
|
|
||||||
// Move the projectile towards the movable circle
|
// Move the projectile towards the movable circle
|
||||||
let targetFormer = createVector(Xbuffer, Ybuffer);
|
let target = createVector(Xbuffer, Ybuffer);
|
||||||
let target = createVector(directionX, directionY);
|
let direction = target.copy().sub(projectile);
|
||||||
let direction = targetFormer.copy().sub(projectile);
|
|
||||||
direction.normalize();
|
direction.normalize();
|
||||||
direction.mult(shotSpeed);
|
direction.mult(shotSpeed);
|
||||||
projectile.add(direction);
|
projectile.add(direction);
|
||||||
|
Reference in New Issue
Block a user