Hello
I have an issue with the mouse scroll wheel and I can not increase the speed of it. I try to use following code in my Model but it doesn’t work:
camera.inputs.removeByType(“FreeCameraMouseInput”);
camera.inputs.addMouseWheel();
camera.wheelPrecision = 0.00000001;
is it possible help me know how can I do ?
here is my PG: https://playground.babylonjs.com/#X2ULQN#46
Pinging @PolygonalSun our input master
(note: camera.wheelPrecision does not exist on UniversalCamera)
1 Like
If you want to change the mouse wheel zoom speed, I’d recommend using the following line
camera.inputs.attached.mousewheel.wheelPrecisionY = 100;
To change any inputs on a camera, you’ll first need to reference the desired input from the attached array for a camera’s given inputs (camera.inputs.attached
). All wheel precision is handled on a per-axis basis but for the most part, you’ll probably only need to change wheelPrecisionY
as that is the default axis controlled by a mouse wheel. The default value is 3 so if that isn’t moving enough, you should be able to use a bigger number (100 worked well for me when testing on your PG).
2 Likes