Fix hovering when roaming
This commit is contained in:
parent
5ab451e862
commit
33df91f7d3
@ -451,7 +451,11 @@ function draw() {
|
|||||||
let shape = shapes[i];
|
let shape = shapes[i];
|
||||||
|
|
||||||
// if hovering over the shape, play the recorded sound
|
// 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 (hovering === true) {
|
||||||
if (shape.hover === false) {
|
if (shape.hover === false) {
|
||||||
shape.sound();
|
shape.sound();
|
||||||
|
Loading…
Reference in New Issue
Block a user