-
Notifications
You must be signed in to change notification settings - Fork 2k
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 crosshair support for Android #7865
Conversation
I do welcome this as an option, however, it only really fixes #6181 if this is enforced in third person view. I don't see any code that is doing this. |
fb20a91
to
f1f49a9
Compare
Just added. Thanks for remind me. |
Tested and working. 👍 The code also seems fine except maybe some questionable styling, however this file clearly must be whitelisted, anyway :D |
When you slide your finger while digging, does the camera rotate? If not, this pull request doesn't fix issue #7645. The YouTube video doesn't show what the case is. |
Yes. The camera still rotates and the player is still digging. Watch my new video. |
f1f49a9
to
aeb2521
Compare
I just realized that something doesn't seem right on third-person back camera mode. You can't select as far as when you're playing on desktop. |
@srifqi I have noticed that 'rear-view' crosshair dig/place is rather awkward on my phone due to its very wide aspect screen, although my tablet seems much more like the windowed desktop version. The only other reason I can think why selection distance might be different for android would be this commit: 2c450ed Are you comparing this in creative or survival mode? Edit: At a guess, it may be that the Note to devs: This is technically a bugfix since #6181 is labelled as such. I don't mean to be pedantic but this could matter if there is a feature freeze :) |
Yes. It has lower distance in survival mode. I cannot find any line that make it differs. I just tested and selection distance bug also happens on desktop.
I agree that this is a bugfix for #6181 and a feature for #7645. This is important to be part of 5.0.0 because many player will be forced to update to 5.0.0 and trick described in #6181 cannot be used. But, if this will be merged after 5.0.0, some player may not update and use trick described in #6181. |
0e3b135
to
39c54e1
Compare
aeb2521
to
7ac2f6e
Compare
ba2f3cc
to
d7d2aea
Compare
d7d2aea
to
638c35f
Compare
I changed some things from the reviews:
|
@srifqi please have a look at 2048's review, just one appproval missing :) |
638c35f
to
0b5cc38
Compare
I followed up the review and rebased the PR. |
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.
Looks good.
If enabled, a crosshair will be shown to select object. This will give Android players a way to play like they play on desktop. On third-person back camera mode, player is forced to use crosshair. On third-person front camera mode, player is unable to select anything.
Crosshair drawing calculation is the same as non-touch control, except when in first-person camera. Rename setting: use_crosshair -> touch_use_crosshair
Crosshair is for all touch screen GUI (not necessarily Android). Rename variable: m_android_use_crosshair -> m_touch_use_crosshair
The rule about allowing no crosshair is moved into a method. The (X, Y) calculation for updating shootline when using crosshair is removed for a specific case.
The case of third-person front camera is already covered in other places.
0b5cc38
to
97ec893
Compare
Thank you for the merge! |
If
touch_use_crosshair
is enabled, a crosshair will be shown to select the object. This will give Android (or any touch screen interface) player a way to play like they play on desktop (with mouse).For third-person camera mode, it is same as the desktop version: on third-person back camera mode, player is forced to use crosshair; while on third-person front camera mode, player is unable to select anything.
Possibly fixes #7645 and fixes #6181.
YouTube video (1)
YouTube video (2)