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

Improve the orbit eye to always maintain an up-axis #5193

Merged
merged 10 commits into from
Feb 15, 2024
Merged

Conversation

emilk
Copy link
Member

@emilk emilk commented Feb 14, 2024

What

  • The orbit eye now always maintains an up axis internally (+Z by default, if there is no ViewCoordinates).
  • When a user rolls the camera (middle mouse drag), we now change the internal up-axis, which makes rolling then orbiting a much better experience as you don't end up in a weird state with no up axis.
  • The orbit eye center visualization now indicates the current up-axis
orbit-camera-up-axis.mp4

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@emilk emilk force-pushed the emilk/orbit_eye_fixes branch 2 times, most recently from 6b0f2d7 to a5c3b5c Compare February 14, 2024 12:44
@emilk emilk force-pushed the emilk/orbit_eye_fixes branch from a5c3b5c to f3b3452 Compare February 14, 2024 13:39
@emilk emilk changed the title Improve orbit eye Improve the orbit eye to always maintain an up-axis Feb 14, 2024
@emilk emilk marked this pull request as ready for review February 14, 2024 13:53
@emilk emilk added 📺 re_viewer affects re_viewer itself include in changelog labels Feb 14, 2024
@teh-cmc teh-cmc self-requested a review February 15, 2024 08:01
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

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

Feels pretty great!

It can be very hard to see the up-axis on the orbit eye center visualization depending on the angle, not sure what we can do about this... Actually, come to think of it, it's hard to see any axis on that visualization: could it be a gizmo-like thing similar to what we do for transforms? (Then again all things ViewCoordinates really confuse me so maybe that doesn't make any sense.)

There is a lurking bug in tilted mode where the camera will just stop behaving appropriately (you can do full orbits, controls start to do random-looking things, etc).
I have no other repro steps than "play around with the middle-mouse button":

24-02-15_09.27.38.patched.mp4

I don't think that's blocking, it's hard to trigger and easy to get out of (just double click).

crates/re_space_view_spatial/src/ui.rs Outdated Show resolved Hide resolved
@emilk emilk merged commit 1e5f933 into main Feb 15, 2024
40 checks passed
@emilk emilk deleted the emilk/orbit_eye_fixes branch February 15, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants