charlie_says Posted April 2, 2020 Share Posted April 2, 2020 Hi, I'm just working on a drag & drop demo, which is working prety well - but, when testing on a touch device, I realised I could drag & drop more than one item at a time. This may be a feature I want to keep, but, I wasn''t sure how I could remove it if I didn't. In Phaser, it's possible to set maxPointers, but in PIXI I'm not sure - I've had a look through the interaction manager docs, and didn't see anything I thought was similar... Is it possible to limit the number of pointers on a touch device? Or, any way to work round this? Thanks! Charlie Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 2, 2020 Share Posted April 2, 2020 > I've had a look through the interaction manager docs https://github.com/pixijs/pixi.js/blob/dev/packages/interaction/src/InteractionManager.js First time I hear about that. No workarounds charlie_says 1 Quote Link to comment Share on other sites More sharing options...
charlie_says Posted April 2, 2020 Author Share Posted April 2, 2020 Ok multi pointers as a feature it is then! Quote Link to comment Share on other sites More sharing options...
themoonrat Posted April 2, 2020 Share Posted April 2, 2020 In the event data, there is a flag called 'isPrimary'. So you could ignore events where that isn't true to effectively disable multi touch? https://pixijs.download/dev/docs/PIXI.interaction.InteractionData.html charlie_says 1 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.