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

Camera controls rework #289

Merged
merged 43 commits into from
May 1, 2024
Merged

Camera controls rework #289

merged 43 commits into from
May 1, 2024

Conversation

kpal81xd
Copy link
Contributor

@kpal81xd kpal81xd commented Apr 12, 2024

  • Rewrote orbit camera to use pointer events
  • Changed right click to orbit around camera (instead of focal point)
  • Changed pan to be middle mouse button/holding shift and right click to drag
  • Added smoothing to flying, orbiting, zooming and panning (frame rate invariant)
  • Fixed panning (doesnt rotate around camera)
camera-rework.mp4

I confirm I have signed the Contributor License Agreement.

@kpal81xd kpal81xd self-assigned this Apr 12, 2024
@kpal81xd kpal81xd added the enhancement New feature or request label Apr 12, 2024
@kpal81xd kpal81xd requested review from a team and slimbuck April 12, 2024 13:20
@slimbuck
Copy link
Member

Did a quick local test and have a few comments:

  • i personally don't like having to switch between the two camera types (and not sure what the win is compared to before)
  • orbit camera has no smoothing
  • orbit camera right mouse button should pan the camera (currently both left and right buttons orbit the camera).
  • mouse scroll zoom is inverted
  • frame function resets the camera orientation. it should just move the camera (not rotate it) to frame the current selection. should also have smoothing.
  • fly camera rotation isn't smoothed
  • i much prefer the distance-based zooming, with smoothing

@kpal81xd
Copy link
Contributor Author

Did a quick local test and have a few comments:

  • i personally don't like having to switch between the two camera types (and not sure what the win is compared to before)
  • orbit camera has no smoothing
  • orbit camera right mouse button should pan the camera (currently both left and right buttons orbit the camera).
  • mouse scroll zoom is inverted
  • frame function resets the camera orientation. it should just move the camera (not rotate it) to frame the current selection. should also have smoothing.
  • fly camera rotation isn't smoothed
  • i much prefer the distance-based zooming, with smoothing

Added all changes!

@slimbuck
Copy link
Member

Did another quick test:

  • 'F' to frame doesn't frame meshes correctly
  • dragging any slider on setting popup rotates the camera (check FOV, for example)
  • panning the camera doesn't seem to go perpendicular to screen
  • panning sensitivity doesn't seem to follow orbit distance (zooming closer in should result in less sensitive panning)
  • zooming all the way in to focus point seems to go too far (goes through the target surface)
  • zoom button is now very sensitive on my mouse

Copy link
Member

@slimbuck slimbuck left a comment

Choose a reason for hiding this comment

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

Awesome! Just a tiny issue with framing then we're good to GO!

@kpal81xd kpal81xd merged commit a71ff92 into main May 1, 2024
2 checks passed
@kpal81xd kpal81xd deleted the camera-rework branch May 1, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants