The error is on totalX:
It seems camera.panningSensibility = 6250 / Math.abs(totalX / 2);
should be inside if (zoomTarget) {
.
The error is on totalX:
It seems camera.panningSensibility = 6250 / Math.abs(totalX / 2);
should be inside if (zoomTarget) {
.