I'm currently facing with an issue in PixiJS (v6 + pixi-viewport) while working with a button's mouseover event. In the code snippet provided, despite using button.toGlobal(new PIXI.Point()) to convert the button's local coordinate to the global coordinate, it seems that the information chain leading to the child-to-global sequence isn't functioning as expected. The global positioning isn't reflecting accurately, even after updating the viewport's transform. Has anyone encountered a similar problem with PixiJS, especially when dealing with mouseover events and coordinate transformations? Your insights on how to correct this issue would be helpful.
The concerned button is a 4th level nested child from the viewport.
Thanks !
button.on("mouseover", () => {
statusHoverListeners.call(_messages, viewport.toScreen(button.toGlobal(new PIXI.Point())))
})
button.on("mouseover", () => {
statusHoverListeners.call(_messages, viewport.toScreen(button.toGlobal(new PIXI.Point())))
})