Jump to content

how can I zoom by keyboard or button with BABYLON.ArcRotateCamera


shedbuilder
 Share

Recommended Posts

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.

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...