You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has the RemoteTransform2D behaving like the RemoteTransform3D, in that it doesn't toggle the target node's scale.y between 1 and -1 when the scale.x is updated, but just keeps it at -1
Crashes when loading the MRP
Not reproducible in:
v2.1.6-stable
Last version I could download before update_rotation was first added. I couldn't download versions v3.0-alpha1 to v3.0-rc3 from https://godotengine.org/download/archive/
The target node just flips in the x axis as expected
A node being controlled by a RemoteTransform node will have its y scale set to -1, if
The RemoteTransform has a negative scale value on only one axis (eg., global_scale.x < 0 and global_scale.y > 0), AND
The RemoteTransform is NOT updating rotation (update_rotation = false)
This issue occurs with both RemoteTransform2D and RemoteTransform3D nodes. Both of them are solved by switching off update_rotation.
With the RemoteTransform2D, though, the targeted node's y scale will update to either 1 or -1 in a weird way. If I toggle the scale.x value on the RemoteTransform2D from 1, -1, 1, -1, the targeted node's scale.y will be 1, -1 -1, 1.
It's like it checks if the new value is negative or positive, and if it's the same sign (positive or negative) as the current value, it toggles, and if it's not, it is the opposite of the sign of the new value.
When the scale values are printed in the console, they are sometimes inaccurate and better describe the values just before they were last updated.
The scale value on the RemoteTransform can be its own or inherited from a parent.
Steps to reproduce
From scratch
Create a new 2D scene
Create a Sprite2D node
Set its texture to the icon.svg file
Create a RemoteTransform2D node
Disable update_position in the Inspector
Set the Sprite2D as the RemoteTransform2D's remote_path
Change the RemoteTransform2D's scale.x to a negative value
The Sprite should flip upside down
With minimal reproduction project
Import the minimal reproduction project .zip as a new project
Run the project or the remote_transform_3D_bug.tscn scene
Press the Spacebar to toggle the parent node's scale.x to 1 or -1. In the 2D scene, with the RemoteTransform2D's update_rotation disabled, it won't actually change any values until the Spacebar has been pressed twice
The broom should flip upside down
In the editor (keep the game window running), select the RemoteTransform2D or RemoteTransform3D
Set the RemoteTransform's update_rotation to true
The broom should now no longer flip upside down when the scale changes
From the documentation you linked, when a Node2D is scaled with a negative x value, it looks like it's flipped on the x axis, but actually
It's flipped on the Y axis and then
Rotated 180 degrees.
With update_rotation disabled, that last step of rotating 180 degrees doesn't happen, leaving it upside down.
I made a 2D test scene and found that, in the editor, the target Node2D has the transform already decomposed (?) into scale.y = -1 and rotated 180 degrees.
Interestingly, when run, the Sprite2D that was upside-down in the editor is initially adjusted to have its scale back to (1,1).
However, changes to the RemoteTransform2D's scale (if the scale.x is still a negative value) when the game is running will make it turn upside down.
I wonder if some sort of compensation for the rotation could work, so if update_rotation is disabled and the scale of the RemoteTransform has a negative x value, it will add the 180 degrees needed to the transform matrix.
Tested versions
Reproducible in:
Not reproducible in:
System information
Godot v4.2.1.stable - Windows 10.0.22631 - GLES3 (Compatibility) - Intel(R) HD Graphics Gen11 () - Intel(R) Celeron(R) N4500 @ 1.10GHz (2 Threads)
Issue description
A node being controlled by a RemoteTransform node will have its y scale set to -1, if
This issue occurs with both RemoteTransform2D and RemoteTransform3D nodes. Both of them are solved by switching off update_rotation.
With the RemoteTransform2D, though, the targeted node's y scale will update to either 1 or -1 in a weird way. If I toggle the scale.x value on the RemoteTransform2D from 1, -1, 1, -1, the targeted node's scale.y will be 1, -1 -1, 1.
It's like it checks if the new value is negative or positive, and if it's the same sign (positive or negative) as the current value, it toggles, and if it's not, it is the opposite of the sign of the new value.
When the scale values are printed in the console, they are sometimes inaccurate and better describe the values just before they were last updated.
The scale value on the RemoteTransform can be its own or inherited from a parent.
Steps to reproduce
From scratch
With minimal reproduction project
Minimal reproduction project (MRP)
Completely unnecessary but could be convenient.
RemoteTransformMRP.zip
Image Attribution:
gBot_complete.png, from https://docs.godotengine.org/en/stable/tutorials/animation/2d_skeletons.html © Copyright 2014-present Juan Linietsky, Ariel Manzur and the Godot community (CC BY 3.0).
The text was updated successfully, but these errors were encountered: