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

Add Window UIMove mode: face user, but rotate around Y only #928

Open
paulmelis opened this issue Mar 27, 2024 · 3 comments
Open

Add Window UIMove mode: face user, but rotate around Y only #928

paulmelis opened this issue Mar 27, 2024 · 3 comments

Comments

@paulmelis
Copy link
Contributor

Describe the feature

Currently, UIMove.FaceUser on WindowBegin() will result in a window that tilts forward/backward when it is placed above/below the user's head position. This isn't always desirable, although having the window rotate vertically (only) to keep facing the user usually is preferred.

Can we have a new UIMove.FaceUserYRotationOnly (or something like that) to only rotate the window around Y to keep facing the user?

@paulmelis paulmelis changed the title Add Window UIMove mode: face user horizontally only Add Window UIMove mode: face user, but rotate around Y only Mar 27, 2024
@maluoi
Copy link
Collaborator

maluoi commented Mar 27, 2024

You can quash extra rotation to try out a Y axis only! This does tilt a small bit while you are interacting with it, which isn't ideal, but may get you pretty close to what you're looking for.

UI.WindowBegin(...
windowPose.orientation.x = 0;
windowPose.orientation.z = 0;
windowPose.orientation.Normalize();

I don't really love Y axis only rotation for Windows, but I do really like it for object placement. I have been meaning to add something like this for a while, but the quaternion quashing has worked pretty well for me so far. I'm not sure I remember seeing the tilt previously, so maybe I've made a change recently that's doing that.

@maluoi
Copy link
Collaborator

maluoi commented Mar 27, 2024

I actually would be quite interested in more specifics about what doesn't work well for the FaceUser for Windows! That's one I'd like to be basically a really good default for UI, so if I can improve it for that case, I'd love to know. Like what would you prefer to happen when the window is above or below the user's head? Would a reduced tilt suffice?

@paulmelis
Copy link
Contributor Author

I think my main problem with the window tilt is that there's no easy way to get rid of it once it's introduced.

This usually happens when developing sitting down, starting the app, then getting up and so needing to move the window up to standing height. Now there's tilt to the window and it remains that way unless I try really hard to position my head height and hand grab position to get back to a vertical window again.

Another case is during demos when successive people of different height grab the window to move it up or down. This usually introduces tilt, which might match some people's height but other's definitely won't.

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