-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
Warn when setting a scale that has a negative X component in 2D #37376
Conversation
I don't disagree with adding a warning, but it should be clear why this is important for the user to know, or else it just seems like a technical comment you'd find in engine code. It should explain the end result on the user side, even briefly, or else it's just noise. |
I don't think this warning is a good idea, you might use an x negative scale on purpose. |
1047d0c
to
28cb8dd
Compare
@groud We still need a way to inform users that negative X scales aren't treated as such internally, since many users ask for help about this and many issues have been opened about this. Do you have another idea on how to warn users? Perhaps the warning should be able to be disabled in the editor settings? Also, there are still ways to use a negative X scale on purpose without a warning. Maybe I should have been more explicit with the description. This doesn't show any warning when doing |
No, even if it's possible to disable it I don't think it is a good idea. I believe stating that in the documentation should be enough. |
28cb8dd
to
1057ecf
Compare
1057ecf
to
7b82428
Compare
7b82428
to
82c52eb
Compare
@groud Where in the documentation should this be stated? I'm not against a solution that only involves documentation changes. |
I'd say in the reference, for the scale property of Node2D ? And maybe in the Transform2D reference too. |
There was this suggestion:
I never saw any discussion in this direction, wondering if or why this isn't a viable solution? |
82c52eb
to
353a573
Compare
353a573
to
38a010c
Compare
69790b1
to
1d5f7dd
Compare
I still think a warning is a good idea, but I just updated this PR so that there's a setting to disable the warning. |
1d5f7dd
to
1ba84fd
Compare
d055db8
to
1aa267b
Compare
1aa267b
to
17ff49c
Compare
17ff49c
to
e49b4ab
Compare
3d70ae2
to
723dd63
Compare
723dd63
to
343bd5c
Compare
343bd5c
to
ebcf7c7
Compare
ebcf7c7
to
57390e6
Compare
57390e6
to
c67321d
Compare
c67321d
to
662f54d
Compare
662f54d
to
29b5521
Compare
29b5521
to
bb1ffa4
Compare
bb1ffa4
to
80b5c7d
Compare
de1caf7
to
3bb5502
Compare
3bb5502
to
c431798
Compare
c431798
to
f66c983
Compare
f66c983
to
1b3ef07
Compare
1b3ef07
to
22daee7
Compare
I dont think this PR makes much sense, Godot 2D nodes dont store tranforms but loc/rot/scale, so negative scale is fine. The only situation where this may work is whether for some reason in the editor the global transform is modified but I am not sure in which case this may happen. |
The OP lists four reports of what seems to be the same issue this fixes. |
Whoa, that's even more multiplicates than I thought. So it's not something once in a blue moon - I think the PR should be reconsidered. |
Yeah I myself closed a few of such reports. But if we go with a warning, there should be a way to disable it. It's only meant to inform the user about the unexpected behavior; if you know it, the warning is useless and annoying. |
@KoBeWi That's what this PR does. |
Due to the way scale is represented with Transform2D, negative scales on the X axis will be changed to negative scales on the Y axis plus a rotation of 180 degrees when decomposed.
Because of this, we should show a warning. Fixes #17405 and its duplicates #21020, #21849, and #42219.