JayJay80 Posted February 8, 2017 Share Posted February 8, 2017 Hey guys, I'm playing around with Babylon a little bit and the posibilities are amazing! Maybe a little to much at the beginning. This question maybe sounds silly for you but I still hope you can and will help me. I tried to stop the camera zoom by mouseWheel but I want to keep the rotation but nothing I'm doing is working. When I do this: this.camera.attachControl(this.canvas, false, true) I can zoom with the wheel and rotate with the keyboard and the wheel. If I don't have this line I can't zoom but of course don't rotate either. Is there a line I have to add or a parameter I need to set to false? I'm thankful for every suggestion. Google wasn't much of a help. Thanks. Jay Quote Link to comment Share on other sites More sharing options...
ViBe Posted February 9, 2017 Share Posted February 9, 2017 Hi, Welcome! You can disable or remove inputs (mousewheel, keyboard, etc.). You can read about this here: http://babylonjsguide.github.io/intermediate/Customizing_Inputs.html A sample to show how you can disable the mousewheel input : var cam = new BABYLON.ArcRotateCamera("cam1", 0, 0, 200, new BABYLON.Vector3(0, 0, 0), scene); scene.activeCamera = cam1; cam1.attachControl(canvas, true); cam1.inputs.attached.mousewheel.detachControl(canvas); JayJay80 1 Quote Link to comment Share on other sites More sharing options...
JayJay80 Posted February 9, 2017 Author Share Posted February 9, 2017 Thank you so much!!!!!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.