frading Posted August 23, 2018 Share Posted August 23, 2018 Hello, I am discovering babylonjs, and tried to create a custom control to pan an ortho camera. I've taken inspiration of this page: http://doc.babylonjs.com/how_to/customizing_camera_inputs But even though I can get click, keyup and keydown to fire, mousedown and mouseup won't fire. I only get mouseup after a right click, but nothing on middle click for instance. Here is a playground to see the problem (when looking at the console, you can see outputs for click events, but not for mousedown). Could anyone see what I'm doing wrong? http://www.babylonjs-playground.com/#342UHD#1 Many thanks in advance for any pointers Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 24, 2018 Share Posted August 24, 2018 http://www.babylonjs-playground.com/#342UHD#2 I don't know if we support mouse wheel clicks, we probably do I just cant test it here at work. Quote Link to comment Share on other sites More sharing options...
frading Posted August 24, 2018 Author Share Posted August 24, 2018 Excellent, thank you. I can see I should listen to pointerup and pointerdown instead of mouseup/mousedown. (As a side note, that probably should be in the doc? Unless I missed it?) And in OrthoCameraInput, I can listen to wheel event, so that's all good. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 24, 2018 Share Posted August 24, 2018 Issue created to improve the doc: https://github.com/BabylonJS/Documentation/issues/1211 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.