andrei.nicolae Posted August 27, 2018 Share Posted August 27, 2018 Hi guys, I'm new to this and I have an issue in my current working project(it's first in phaser). I want to know how can I zoom in the game when it's opened in a mobile browser? The game is too small and I want to zoom and slide the whole canvas in the browser window. I can do this from outside the canvas but I cannot drag then from the canvas itself. Please help! Thank you. Link to comment Share on other sites More sharing options...
samme Posted August 27, 2018 Share Posted August 27, 2018 If the game canvas initially appears too small you probably want to configure the viewport. Link to comment Share on other sites More sharing options...
andrei.nicolae Posted August 29, 2018 Author Share Posted August 29, 2018 On 8/27/2018 at 8:23 PM, samme said: If the game canvas initially appears too small you probably want to configure the viewport. Thanks for the reply, this works but does not fit my needs. My game is a hidden object, it opens ok on mobile browser, it fills right the browser. The game itself needs to be zoomable, so want we want to achieve from a user perspective is the next thing: users touches the canvas with two fingers and expands, then the whole canvas zooms, like any other website, the user will use a finger to pan the image so he can find objects easily in the game. In the current state the user can pinch and pan outside the canvas, the canvas scales but it's not responsive itself to pan and zoom. I attached a video of how the game works now and showing how it doesn't work when I try touching the canvas. Thank you! video-1535551724.mp4 Link to comment Share on other sites More sharing options...
iKest Posted August 29, 2018 Share Posted August 29, 2018 use 2 pointers in touch manager for zoom event. Link to comment Share on other sites More sharing options...
andrei.nicolae Posted August 30, 2018 Author Share Posted August 30, 2018 20 hours ago, iKest said: use 2 pointers in touch manager for zoom event. I'm not trying to zoom in the canvas, I'm trying to zoom the website touching the canvas, and pan the website touching the canvas. Link to comment Share on other sites More sharing options...
andrei.nicolae Posted August 30, 2018 Author Share Posted August 30, 2018 @samme Sorry, can you point me in the right direction? I'm asking you because you seem to know what you're talking about, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts