stealman Posted April 10, 2018 Share Posted April 10, 2018 Hello, I have found another problem after upgrade from PIXI2 to PIXI4 This time it is about mouse interaction, it seems like that I cannot handle both buttons held simultaneously as it worked with PIXI2 I am using right button (with mousemove) to navigate character on the map while left button (with mousemove) is used to move map and it is really usefull to use it both at once. Simply put .. window.stage.mousedown = function(event) { log("LEFT DOWN"); }; window.stage.rightdown = function(event) { log("RIGHT DOWN"); }; If I am HOLDING left button and click with right - no event is fired If I am HOLDING right button and click with left - no event is fired Same problem - and probably even worse - is when I am moving (holding right button down), then I cannot interact with another objects at the same time (because left button doesnt fire any event). I have tried pointerdown instead of mousedown, but then right button fired both events which is also wrong. This is really big issue if that possibility is removed in PIXI4 Someone faced that problem ? Thanx in advance Quote Link to comment Share on other sites More sharing options...
stealman Posted April 11, 2018 Author Share Posted April 11, 2018 Maybe I could somehow use native (non-pixi) events on the canvas and manage them without PIXI. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 12, 2018 Share Posted April 12, 2018 Sounds like you have to look at InteractionManager https://github.com/pixijs/pixi.js/blob/dev/src/interaction/InteractionManager.js and patch it. Its possible even without cloning the repo and building the lib, the interactionManager instance will be in "renderer.plugins.interaction" Quote Link to comment Share on other sites More sharing options...
stealman Posted May 26, 2018 Author Share Posted May 26, 2018 Thax for an answer Ivan but in all honesty, I am not sure that I know what are you talking about How may I patch that InteractionManager ? 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.