Fix hovering when roaming
This commit is contained in:
parent
5ab451e862
commit
33df91f7d3
@ -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…
Reference in New Issue
Block a user