Jump to content

Change mouse wheel zoom speed for ArcRotateCamera


Vousk-prod.
 Share

Recommended Posts

Heyo guys,

 

For my scene the speed is really too fast when scrolling mouse wheel.

Is there a variable we can set to change the zoom factor ?

 

 It seems in babylon.arcRotateCamera.js that the only used factor is hardcoded value "120"

            this._wheel = function (event) {                var delta = 0;                if (event.wheelDelta) {                    delta = event.wheelDelta / 120;                } else if (event.detail) {                    delta = -event.detail / 3;                }                if (delta)                    that.inertialRadiusOffset += delta;                if (event.preventDefault) {                    if (!noPreventDefault) {                        event.preventDefault();                    }                }            };

but maybe I misunderstand something (and I don't know what delta = -event.detail / 3; is about)...

 

Link to comment
Share on other sites

  • 3 years later...

Hi, using 3.0 alpha in chrome, trying to tame the zoom factor / speed but i can't really get any effect with arcRotateCamera, I am trying to have a slower mosue wheel zoom as all my world is in a-1,1 range for all coordinates. Any suggestion?

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...