-
-
Notifications
You must be signed in to change notification settings - Fork 384
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
base: master
Are you sure you want to change the base?
feat(RenderWindowInteractor): commit mouse movement data in pointerlock #3241
Conversation
Sources/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator/index.js
Outdated
Show resolved
Hide resolved
Sources/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator/index.js
Show resolved
Hide resolved
Sources/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator/index.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 ?
Sources/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator/index.js
Show resolved
Hide resolved
Sources/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator/index.js
Outdated
Show resolved
Hide resolved
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
38601ed
to
12748dd
Compare
Modify RenderWindowInteractor to return mouse movement data in screen event position Maintain InteractorStyleManipulator manipulator during pointerLock Update MouseCameraTrackballFirstPersonManipulator
12748dd
to
9c5acdd
Compare
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