Hi I have got a complex situation here. I would like my screen to not register any finger-dragging gesture on a touch screen, because it messes up my program.
My opening lines are:
var scene = new BABYLON.Scene(engine);
scene.clearColor = new BABYLON.Color3(0, 0, 0);
var camera = new BABYLON.UniversalCamera(“UniversalCamera”, new BABYLON.Vector3(0, 0, -10), scene);
camera.setTarget(BABYLON.Vector3.Zero());
var touch = new BABYLON.FreeCameraInputsManager();
touch.removeMouse();
console.log(touch);
camera.inputs = touch;
camera.attachControl(canvas, false);
As you can see, I already try to disable using mouse to adjust the camera. And later in the game, I have things that catch the appropriate gesture:
mesh.actionManager = new BABYLON.ActionManager(scene);
mesh.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickDownTrigger, pushkey));
mesh.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickUpTrigger, releasekey));
mesh.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickOutTrigger, releasekey));
mesh.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPointerOutTrigger, releasekey));
However, whenever I make a “dragging” gesture on the touch screen, the whole game messes up. Is there a way to bypass that? In other words, I would only want the screen to react when I tap and release specify objects and make sounds accordingly.
Thanks!