diff --git a/voicegardens/static/voicegardens.js b/voicegardens/static/voicegardens.js index fd0e05b..f19afd6 100644 --- a/voicegardens/static/voicegardens.js +++ b/voicegardens/static/voicegardens.js @@ -451,7 +451,11 @@ function draw() { let shape = shapes[i]; // if hovering over the shape, play the recorded sound - let hovering = collidePointPoly(mouseX, mouseY, shape.vectors); + let hovering = collidePointPoly( + mouseX - screenX, + mouseY - screenY, + shape.vectors + ); if (hovering === true) { if (shape.hover === false) { shape.sound();