shedbuilder Posted January 21, 2016 Share Posted January 21, 2016 1. With BABYLON.ArcRotateCamera how can I allow the user to zoom in and out with keyboard keys or other software control? I wrote some code which uses camera.setPosition to get some specific orthogonal camera angles but I am looking for something to offer the user who does not have mouse scroll wheel or multitouch capability. 2. Also, when using Chrome in Windows 7 and 10, the BABYLON.ArcRotateCamera behaviour seems to change when you switch away from the browser to some other program and later switch back. At this point the mouse act like free camera instead of BABYLON.ArcRotateCamera. Quote Link to comment Share on other sites More sharing options...
Temechon Posted January 21, 2016 Share Posted January 21, 2016 Hi, 1. You just have to update camera.radius in order to zoom. Update it with a keydown and you're done 2. I don't think it's related to the ArcRotateCamera, which works fine for me. Maybe is it linked to your code updating position ? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 24, 2016 Share Posted January 24, 2016 Hi guys! I have seen issue #2 too, running Firefox on Win7. I think I was working on http://www.babylonjs-playground.com/#1VGWP9#4 at the time. All was working fine, then I go to a different window, do something, then come back, and ArcRotateCamera starts acting like a FreeCamera (LeftMouseButton drag... zooms in/out instead of panning and tilting). Reload scene fixes it. Unfortunately, it only happens sometimes, which makes it difficult to troubleshoot. For me, holding the CONTROL key while doing LMB-drag with ArcRotateCamera == zoom. So, when this problem happens, it is AS IF the control button gets stuck ON. I'll study it some more, and try to gather more info. This MIGHT be related to hand.js... not sure. Others... please comment here if you know anything about this. Thanks! 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.