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

RemoteTransform2D scale only with global coordinates enabled is wrong #31260

Open
mrcdk opened this issue Aug 10, 2019 · 3 comments
Open

RemoteTransform2D scale only with global coordinates enabled is wrong #31260

mrcdk opened this issue Aug 10, 2019 · 3 comments

Comments

@mrcdk
Copy link
Contributor

mrcdk commented Aug 10, 2019

Godot version:

3.2dev, 3.1.1, 3.1, 3.0.6 and maybe others

OS/device including version:

Windows 10

Issue description:

Looks like when you get the scale from a Transform2D the coordinates it uses aren't the ones one would expect as per issue #21020

This makes the RemoteTransform2D scale behavior when its use global coordinates enabled (the default) and only the scale selected to behave unexpectedly

https://i.imgur.com/zIksz7f.gifv

Steps to reproduce:
Check the MRP

Minimal reproduction project:

remotetransform2d_scale_issue.zip

@mrcdk mrcdk changed the title RemoteTransform2D scale with global coordinates enabled is wrong RemoteTransform2D scale only with global coordinates enabled is wrong Aug 10, 2019
@mrcdk
Copy link
Contributor Author

mrcdk commented Aug 10, 2019

@reduz answer:

[13:20:44] <reduz> mrcdk: the problem is that if you mirror one of the axes,  you break rotation decomposing
---
[13:27:57] <reduz> mrcdk: and also, if you think about it logically, there is no way to tell which axis was scaled if you look at the matrix
[13:32:34] <mrcdk> yeah, makes sense
[13:34:24] <mrcdk> how could RemoteTransform2D be fixed though?
[13:37:45] <reduz> mrcdk: if you are just using rotation, scale and translation it should just work because it sets a transform directly right? so I assume it breaks when you dont use one of the transforms
[13:38:17] <mrcdk> yes, it breaks when using only the scale
[13:40:12] <reduz> ahh, it makes sense, i dont really know how this can be fixed
---
[13:42:05] <reduz> maybe somehow documentation should be written to specify that if your source node in global transform uses a negative scale in either x or y, in global coordinates, it is not possible to mathematically infer how to apply that scale in the destination node
[13:42:15] <reduz> we could even use a node warning also (using get_configuration_warning()
[13:43:04] <reduz> so you can tell something is broken the moment you apply it

@KoBeWi
Copy link
Member

KoBeWi commented Sep 17, 2020

Can anyone still reproduce this bug in Godot 3.2.3 or any later release?
(I checked the MRP, but not sure what to look at)

@akien-mga
Copy link
Member

The MRP still behaves as in the OP. As per #31260 (comment), the solution seems to be to write some documentation to warn users about this.

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

No branches or pull requests

3 participants