When setting wheelDeltaPercentage on the ArcRotateCamera, the camera appears to zoom out much faster than it zooms in (this effect increases with higher values of wheelDeltaPercentage). In fact with a wheelDeltaPercentage of around 0.1, the zoom-in speed is so slow that it does not appear to be zooming in at all.
Here’s a reproduction in the playground
This appears to affect both Firefox and Chrome, but the difference is greater in Firefox.
1 Like
Welcome aboard!
There is indeed a special treatment when zooming in:
delta = this.computeDeltaFromMouseWheelLegacyEvent(wheelDelta, this.camera.radius);
// If zooming in, estimate the target radius and use that to compute the delta for inertia
// this will stop multiple scroll events zooming in from adding too much inertia
if (delta > 0) {
var estimatedTargetRadius = this.camera.radius;
var targetInertia = this.camera.inertialRadiusOffset + delta;
for (var i = 0; i < 20 && Math.abs(targetInertia) > 0.001; i++) {
estimatedTargetRadius -= targetInertia;
targetInertia *= this.camera.inertia;
}
estimatedTargetRadius = Scalar.Clamp(estimatedTargetRadius, 0, Number.MAX_VALUE);
delta = this.computeDeltaFromMouseWheelLegacyEvent(wheelDelta, estimatedTargetRadius);
}
I don’t know however if that is expected that the speed is different when zooming in vs zooming out… Note that if you use wheelDeltaPercentage=0.01
for eg, the speed will be the same (at least visually)…