-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Merged by Bors] - Nicer usage for scene viewer #7035
Conversation
… nicer defaults in scene viewer
} | ||
|
||
if mouse_delta != Vec2::ZERO { | ||
// Apply look update | ||
options.pitch = (options.pitch - mouse_delta.y * 0.5 * options.sensitivity * dt) | ||
options.pitch = (options.pitch - mouse_delta.y / 180.0 * options.sensitivity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you pull this magic number out into a const so readers have a better sense of why it exists?
180 is particularly suspicious too :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, I think the 180.0 just comes from a misunderstanding in Valorant's dev team and then just deciding to stick with it, because it ends up being used in radians, so it ends up being 1 dot from the mouse is 1/180
radian movement (which doesn't make a whole lot of sense given 180/360 are degree based, unless I'm missing something). But this is just kinda speculation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor the magic number into a const and this LGTM.
Nice improvement, lgtm! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
# Objective Scene viewer mouse sensitivity/cursor usage isn't the best it could be atm, so just adding some quick, maybe opinionated, tweaks to make it feel more at home in usage. ## Solution - Mouse delta shouldn't be affected by delta time, it should be more expected that if I move my mouse 1 inch to the right that it should move the in game camera/whatever is controlled the same regardless of FPS. - Uses a magic number of 180.0 for a nice default sensitivity, modeled after Valorant's default sensitivity. - Cursor now gets locked/hidden when rotating the camera to give it more of the effect that you are grabbing the camera.
# Objective Scene viewer mouse sensitivity/cursor usage isn't the best it could be atm, so just adding some quick, maybe opinionated, tweaks to make it feel more at home in usage. ## Solution - Mouse delta shouldn't be affected by delta time, it should be more expected that if I move my mouse 1 inch to the right that it should move the in game camera/whatever is controlled the same regardless of FPS. - Uses a magic number of 180.0 for a nice default sensitivity, modeled after Valorant's default sensitivity. - Cursor now gets locked/hidden when rotating the camera to give it more of the effect that you are grabbing the camera.
# Objective Scene viewer mouse sensitivity/cursor usage isn't the best it could be atm, so just adding some quick, maybe opinionated, tweaks to make it feel more at home in usage. ## Solution - Mouse delta shouldn't be affected by delta time, it should be more expected that if I move my mouse 1 inch to the right that it should move the in game camera/whatever is controlled the same regardless of FPS. - Uses a magic number of 180.0 for a nice default sensitivity, modeled after Valorant's default sensitivity. - Cursor now gets locked/hidden when rotating the camera to give it more of the effect that you are grabbing the camera.
Objective
Scene viewer mouse sensitivity/cursor usage isn't the best it could be atm, so just adding some quick, maybe opinionated, tweaks to make it feel more at home in usage.
Solution