Jump to content

[SOLVED] can't fire mousedown events on middle click with custom input


Recommended Posts


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?


Many thanks in advance for any pointers


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...