Skip to content

Commit f5c3ab0

Browse files
committed
Handle any origin
1 parent 9acbece commit f5c3ab0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

v3/src/input/components/PointWithinGameObject.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ var PointWithinGameObject = function (gameObject, x, y)
88
return false;
99
}
1010

11+
// Normalize the origin
12+
x += gameObject.displayOriginX;
13+
y += gameObject.displayOriginY;
14+
1115
return gameObject.hitAreaCallback(gameObject.hitArea, x, y);
1216
};
1317

0 commit comments

Comments
 (0)