Please do not forget to add a link to a Playground to get a faster answer:
Hi all,
I am new to this forum, I am trying out the 3D renderingof obj and flb files I am trying to pan using shift+left click instead of default panning.
I am using the below code but for the first time when click on shift +left the panning is not happening .
Anyone please help me out with this
Camera.attachcontrol(canvas,true,false,-1);
scene.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnKeyDownTrigger, function (evt) {
if(evt.sourceEvent.keyCode === 16) {
camera._panningMouseButton = 0;
}
}));
scene.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnKeyUpTrigger, function (evt) {
if(evt.sourceEvent.keyCode === 16) {
camera._panningMouseButton = -1;
}
}));