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
Note 2: (1, -3) and (-1, 3) are equal after saving the project because the project reload information from transforms and the (-1, 3) is convert to (1, -3).
Steps to reproduce
Create a scene with Node2D as root
Add a Skeleton2D
Add a Bone2D
Scale Bone2D by (1, -3)
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
Godot version
v4.2.dev3.official [013e8e3]
System information
Ubuntu 23.04 x86_64
Issue description
When scaling the last Bone2D from the chain, there is a specific case where the bone length will be more than expected.
The main logic is to use the lower value from scale
MIN(get_global_scale().x, get_global_scale().y)
:godot/scene/2d/skeleton_2d.cpp
Line 328 in c495eb5
But this can go wrong when the lower value is negative, attention for (-1, 3) and (1, -3):

Note: This can easily be fixed by getting the absolute value from scale.
rel = Vector2(cos(angle_to_use), sin(angle_to_use)) * (length * MIN(ABS(get_global_scale().x), ABS(get_global_scale().y)));
Note 2: (1, -3) and (-1, 3) are equal after saving the project because the project reload information from transforms and the (-1, 3) is convert to (1, -3).
Steps to reproduce
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: