DevMachine Posted December 8, 2020 Share Posted December 8, 2020 Hi Dev community, I have noticed that when I load up my PIXI game, the pointerover event doens't trigger after the first page load. When it doesn't trigger for one button, it also doesn't work for other buttons. This is usually fixed by refreshing the page, and once refreshed, if it works, it seems like it will keep working. I have also noticed that after I right click and hit Inspect, the content starts being responsive, and works as expected. Button clicks and the drag function below are triggered fine on the same buttons. I have this sort of setup for my buttons: this.sprite .on('pointerover', () => this.hover()) .on('pointerout', () => this.hoverOff()) // click .on('mousedown', () => this.mouseDown()) .on('touchstart', () => this.mouseDown()) // events for drag end .on('mouseup', () => this.mouseUp()) .on('mouseupoutside', () => this.mouseUp()) .on('touchend', () => this.mouseUp()) .on('touchendoutside', () => this.mouseUp()) // events for drag move .on('mousemove', (event) => this.drag(event)) .on('touchmove', (event) => this.drag(event)) At first I assumed that it was related to assets not being loaded well, but now I am also using an asset loader and only starting to render after the necessary textures have been loaded. I appreciate any help. Let me know what further info you may need. I noticed that many people had issues with pointerovers on mobile, but I am on desktop Chrome, so I thought it's also not related to that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.