Hello everyone
is it possible to access the some functions inside the src/Cameras/Inputs/arcRotateCameraMouseWheelInput.ts and use it?
I want use the camera.inputs.attached.mousewheel._zoomToMouse(e)
to define button for zoom in/out with the button, I want to know is it possible to use it?
here is my PG: https://playground.babylonjs.com/#Q8VH3H#33
and here is my code:
camera.zoomToMouseLocation = true;
var a= camera.inputs.attached.mousewheel["_zoomToMouse"]
console.log("a",a)
scene.onPointerObservable.add((e) => {
let delta = 0.01;
scene.registerBeforeRender(() => {
document.onkeydown = (e) => {
if (e.key == "w") {
delta += 0.1
}
if (e.key == "q") {
delta -= 0.1
}
};
camera.inputs.attached.mousewheel._zoomToMouse(delta)
});
}, BABYLON.PointerEventTypes.POINTERTAP);
sometimes it works, and sometimes I have an error which said Uncaught TypeError: Cannot read property 'normal' of undefined