Skip to content

Scene: Allow for customising what button can be used for clicking and dragging, allow for providing custom Sense #5891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mitchmindtree opened this issue Apr 8, 2025 · 0 comments · May be fixed by #5893

Comments

@mitchmindtree
Copy link
Contributor

Currently, the Scene allocates a response with Sense::click_and_drag and checks response.dragged() to determine whether the scene should be panned by response.drag_delta(). This is great for users who are happy to have the scene dragged with any button.

However, this is unsuitable for those who wish to only drag with a particular button (e.g. Middle) or to have no drag behaviour at all (e.g. maybe they only want to pan the scene via scrolling).

Potential Solution

  • Allow for specifying a custom Sense for the scene. This would allow users to disable the Sense::click_and_drag behaviour if they wish in favour of Sense::hover.
  • Allow for optionally specifying a .drag_pointer_button(PointerButton) to enable dragging only with a specific pointer button.

Ideally, we could just add the custom sense method, and then allow the user to check for whatever interaction they would like to pan the scene themselves, though I'm not sure how we'd expose the ability to pan the scene smoothly from inside the user content function 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant