Browse Source

Fix hovering when roaming

main
Luke Murphy 5 years ago
parent
commit
33df91f7d3
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 6
      voicegardens/static/voicegardens.js

6
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();

Loading…
Cancel
Save