Skip to content

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

@hybridherbst

Description

@hybridherbst

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions