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 Tablet/Trackpad 3D navigation preset #97985

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

RobProductions
Copy link
Contributor

@RobProductions RobProductions commented Oct 8, 2024

Following up on the discussion from #85331 , if a user enables "emulate 3 button mouse" with the Godot preset, they will see the camera always orbit because the Godot preset doesn't use any hotkey for orbit. Bringing in "Alt" as a fallback key for 3 button mouse users (which is what the code used to do) would eliminate their ability to customize the orbit button, so instead the idea of a Tablet/Trackpad preset seems to work much better.

With this change, 3 button mouse is now tied to the navigation preset, so if you set the preset to Tablet/Trackpad it will enable 3 button mouse and also set the orbit key to "Alt" so that Tablet users have better default settings. I also added options and functionality for mouse buttons 4 and 5; none of the presets use this but this should allow users to customize 3D nav further for specific tablet pens or mice.

image

With this, tablet and trackpad users can simply change the preset setting rather than changing "Emulate 3 button mouse" which should provide a clearer experience now that everything is customizable. Similarly, if someone changes "Emulate 3 button mouse" from the default the preset will change to Custom which should help clarify that they are going outside of the default options.

One question I had about the presets: is it okay to keep pushing down the Custom preset to a different number if we add more presets that go above it in the UI? I numbered them in this commit for clarity but say for example we add a Blender preset in the future, is it okay for that to become element 4 with Custom getting pushed to element 5? Or should I just reorder Custom to be at the top now for better futureproofing?

Thanks and let me know if there are any questions :)

@AThousandShips
Copy link
Member

The new mode needs to be documented in the settings docs

@RobProductions RobProductions requested a review from a team as a code owner October 8, 2024 17:57
@RobProductions
Copy link
Contributor Author

Thanks for the help! I've updated the docs and changed Custom back to value 3 so that shouldn't be a compat issue anymore, let me know if that looks good

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

I don't think it's worth being so explicit over this one editor setting. The other affected ones are listed at the bottom of the description.

This commit adds a new navigation preset called `Tablet/Trackpad` which enables "Emulate 3 Button Mouse" to more quickly set up good default keys for tablet users.

It also adds support for mouse buttons 4 and 5 in the navigation settings which will be helpful if users want to customize 3D navigation further for specific pens/mice.
@RobProductions RobProductions requested a review from a team as a code owner December 4, 2024 18:02
@RobProductions
Copy link
Contributor Author

@Mickeon Done, thanks!

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally on a MacBook Pro, it works as expected. The shortcuts with this preset make sense to me.

@Repiteo Repiteo modified the milestones: 4.x, 4.4 Dec 11, 2024
@Repiteo Repiteo merged commit c5f0d57 into godotengine:master Dec 12, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Dec 12, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants