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

Having Space Navigator in project breaks middle click to focus in SceneView #41

Open
hybridherbst opened this issue Oct 1, 2021 · 1 comment

Comments

@hybridherbst
Copy link
Contributor

hybridherbst commented Oct 1, 2021

Describe the bug
Having Space Navigator in project breaks middle click to focus in SceneView.
Usually middle click will move the view and re-center on the clicked point.
With this active, middle click does something but doesn't recenter the view.

To Reproduce
Steps to reproduce the behavior:

  1. Create a scene
  2. Make two cubes with a bit of distance
  3. Middle-click one cube, note camera doesn't recenter
  4. Middle-click the other cube, note camera doesn't recenter
  5. Open ViewportController.cs
  6. in the static ViewportController() constructor, add return; as first line
  7. Repeat the test above
  8. Note that the camera properly recenters

Expected behavior
Scene View behaviour is unaffected by package

Details (please complete the following information):

  • Issue occurred while navigating editor viewports
  • Device type [All]
  • Connection [wired]
  • OS: [e.g. Windows]
  • SpaceNavigator Driver version [e.g. 2.0.0-beta.7]

Edit: Might have the same reason as the drift seen (#29), since it seems that the comparison for == Vector3.zero fails since the inputs are actually never fully zero (this is in idle state):
image
A better way to react to input would be to actually listen for the InputAction.performed event instead of polling every frame and not knowing if data has actually changed.

@PatHightree
Copy link
Owner

Good find, apparently there's some camera positioning data being cached in the driver somewhere.
Had a quick look but didn't see anything obvious.

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

No branches or pull requests

2 participants