Dan335 Posted June 26, 2016 Share Posted June 26, 2016 Anyone have info about multi-touch? I can't find much. I'm trying to do pinch zoom. It looks like I should use event.data.originalEvent.changedTouches but it seems to only have one touch at a time and the identifier is always 1. event.data.originalEvent.touches is always empty. Quote Link to comment Share on other sites More sharing options...
Giedrius Posted July 31, 2018 Share Posted July 31, 2018 @Dan335 try using: e.data.originalEvent.targetTouches Quote Link to comment Share on other sites More sharing options...
phaserlover Posted August 10, 2018 Share Posted August 10, 2018 I did it this way with hammerjs this.hammer = new Hammer.Manager(this.canvas); const pinch = new Hammer.Pinch(); this.hammer.add([pinch]); this.hammer.on('pinchmove', (event) => { mainCamera.zoom = (mainCamera.zoom * 0.9 + mainCamera.zoom * event.scale * 0.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.