Skip to content

feat(RenderWindowInteractor): commit mouse movement data in pointerlock #3241

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jo-Byr
Copy link

@Jo-Byr Jo-Byr commented Apr 22, 2025

Fix pending TODO in MouseCameraTrackballFirstPersonManipulator to move pointerLock mouse movement logic to vtkRenderWindowInteractor

Modify RenderWindowInteractor to return mouse movement data in pointerLock mode
Freeze InteractorStyleManipulator manipulator during pointer
Lock Update MouseCameraTrackballFirstPersonManipulator

Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking more about it:

"endInteraction" is not bound to be called only on mouse button up.
Maybe the "canEndManipulator" could be guessed from onButtonUp instead of endInteraction
Maybe the check on internal.interactor.isPointerLocked() could be applied by default by the interactor style: if we are in a pointer lock mode, then releasing the button does not turn off the manipulator...
WDYT ?

@Jo-Byr
Copy link
Author

Jo-Byr commented Apr 25, 2025

Thinking more about it:

"endInteraction" is not bound to be called only on mouse button up. Maybe the "canEndManipulator" could be guessed from onButtonUp instead of endInteraction Maybe the check on internal.interactor.isPointerLocked() could be applied by default by the interactor style: if we are in a pointer lock mode, then releasing the button does not turn off the manipulator... WDYT ?

So we would check if button === Left && isPointerLocked and if it's the case we don't end the manipulator ?

I suppose it could work, if there is no instance where we get into pointerLock from another way than LeftMouseButton and have different left mouse button interaction.

Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jo-Byr Jo-Byr force-pushed the move-pointerlock-movement-logic-to-renderwindowinteractor branch from 38601ed to 12748dd Compare April 29, 2025 09:48
Modify RenderWindowInteractor to return mouse movement data in screen event position
Maintain InteractorStyleManipulator manipulator during pointerLock
Update MouseCameraTrackballFirstPersonManipulator
@Jo-Byr Jo-Byr force-pushed the move-pointerlock-movement-logic-to-renderwindowinteractor branch from 12748dd to 9c5acdd Compare April 29, 2025 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants