Skip to content
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

[Feature Request] - capture mouse while mouse down #349

Open
leon opened this issue Dec 7, 2024 · 3 comments
Open

[Feature Request] - capture mouse while mouse down #349

leon opened this issue Dec 7, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed never-stale

Comments

@leon
Copy link

leon commented Dec 7, 2024

UE Version:
E.g. UE 5.5.0

Frontend Version:
E.g. UE5.5-0.4.0

Problem component
Frontend

Description
I have a project which is setup with

DefaultViewportMouseCaptureMode=CaptureDuringMouseDown
DefaultViewportMouseLockMode=DoNotLock

I want the user to be able to look around as long as they have their mouse button pressed.
The bug request is that if I press the mouse button, keep it pressed and move my cursor outside the video element, the mouse stops sending commands to unreal.

I think this could be solved by using
https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture
So that even though we move outside the video element the mouse is continuing to send events.

Expected behavior
When pressing the mouse left button and moving I should look around in pixel streaming world until I let go of the mouse.
it should not matter where my cursor is.

@leon leon added the bug Something isn't working label Dec 7, 2024
@mcottontensor
Copy link
Collaborator

If you use "Locked Mouse" in the UI/Control Scheme options on the frontend the mouse will remain locked to the viewport of the stream once you click on it and remain locked until you hit esc. Is this something that will solve your issue or are we thinking of different situations?

@leon
Copy link
Author

leon commented Dec 16, 2024

My situation is I'm developing an interactive apartment.
I never want to lock the mouse because it's not a game, and I don't like that interaction model.
it's more of a click interactive setup.

the only time I want to lock the interaction is when the mouse button is pressed.

So no, it would not solve my problem.

@mcottontensor
Copy link
Collaborator

mcottontensor commented Dec 16, 2024

I see what you mean. We don't implement anything like that currently. You would have to implement a solution yourself.

We would be happy to accept any PR you might end up with when implementing this. I would look into the existing control schemes for hints on the best way to approach it.

@lukehb lukehb added enhancement New feature or request and removed bug Something isn't working labels Dec 16, 2024
@lukehb lukehb changed the title [BUG] - capture mouse while mouse down [Feature Request] - capture mouse while mouse down Dec 16, 2024
@mcottontensor mcottontensor added the help wanted Extra attention is needed label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed never-stale
Projects
None yet
Development

No branches or pull requests

3 participants