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

Touchscreen: Camera movement improvements #14301

Merged
merged 3 commits into from Mar 1, 2024

Conversation

grorp
Copy link
Member

@grorp grorp commented Jan 24, 2024

Fixes #11003.

On touchscreens, you can currently only move your camera while digging if touch_use_crosshair = true is set. This is an arbitrary and unnecessary limitation. The Android version of Minecraft doesn't have this issue. An example where it is especially annoying: If you're charging a bow in MineClone 2, you can't aim if you don't enable touch_use_crosshair.

This PR removes this limitation.

This PR also adjusts touchscreen_sensitivity to the display density to avoid too fast camera movement on high-DPI displays. The effective sensitivity stays the same for xhdpi displays, which is the most common density according to https://developer.android.com/about/dashboards/.

Additionally, this PR removes the visible camera jump when you cross the touchscreen_threshold.

To do

This PR is a Ready for Review.

Looking for feedback from touchscreen players.

How to test

Try moving the camera while digging (or aiming a bow in MineClone 2) with touch_use_crosshair = false.

@grorp grorp added Android Feature ✨ PRs that add or enhance a feature @ Client / Controls / Input labels Jan 24, 2024
@Zughy Zughy added Testing needed Supported by core dev Not on the roadmap, yet some core dev decided to take care of this PR labels Jan 25, 2024
@grorp grorp changed the title Touchscreen: Allow camera movement while digging without touch_use_crosshair Touchscreen: Camera movement improvements Jan 27, 2024
Copy link
Member

@srifqi srifqi left a comment

Choose a reason for hiding this comment

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

This PR looks good to me.

src/gui/touchscreengui.cpp Outdated Show resolved Hide resolved
@grorp grorp added the Waiting (on dependency) Waiting on another PR or external circumstances (not for rebases/changes requested) label Feb 21, 2024
@grorp grorp removed the Waiting (on dependency) Waiting on another PR or external circumstances (not for rebases/changes requested) label Feb 24, 2024
@grorp
Copy link
Member Author

grorp commented Feb 24, 2024

Rebased after #14389.

@srifqi Have you tested this as well? Especially the last commit makes a quite significant difference and I'd like to know what you think about it.

@grorp grorp requested a review from srifqi February 24, 2024 12:42
Copy link
Member

@srifqi srifqi left a comment

Choose a reason for hiding this comment

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

The current state of this PR looks good to me. I can not feel any difference while testing, though.

@grorp
Copy link
Member Author

grorp commented Mar 1, 2024

I assume your approval applies even though you didn't add the "One approval" label?

I'd like this PR to get more testing before it's merged, but no players have shown interest in testing it for 1+ month. Merging it seems to be the only way for it to get more testing. If you didn't notice a difference, the changes may have less impact than I expected anyway.

@grorp grorp merged commit aac616f into minetest:master Mar 1, 2024
13 checks passed
@grorp grorp deleted the move-camera-while-digging branch March 3, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android @ Client / Controls / Input Feature ✨ PRs that add or enhance a feature One approval ✅ ◻️ Supported by core dev Not on the roadmap, yet some core dev decided to take care of this PR Testing needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move view angle while breaking or punching nodes
3 participants