godot icon indicating copy to clipboard operation
godot copied to clipboard

Scale manipulator does not scale rotated objects uniformly

Open CookieBadger opened this issue 3 years ago • 2 comments

Godot version

4.0beta13

System information

Windows10, AMD Ryzen 9 3900XT, RTX3070, Vulkan

Issue description

I would expect when using the scale tool on an object with a scale of (1,1,1) without touching any of the handles to result in a uniform scale again (i.e. 0.1, 0.1, 0.1) and not one, where all components are different. However, when the object has been rotated, this is the case no matter if using local or global transform.

RotateAndScaleBroken

This behavior was working properly in 3.x

Steps to reproduce

  • Create an object (e.g. a CSGBox3D)
  • Rotate it a little on different axes
  • Scale it with the scale tool, without using any handle (uniform scale)
  • Observe how the object is now slightly squashed or stretched, i.e. the scale components are not equal anymore

Minimal reproduction project

BrokenScale.zip

Observe how the cube turns into a pillar when using the Scale Manipulator.

CookieBadger avatar Jan 19 '23 13:01 CookieBadger

still valid in beta15 badScaling

CookieBadger avatar Jan 25 '23 22:01 CookieBadger

Started bisecting the issue. Issue did not appear in 4.0-dev.20211210, started appearing in 4.0-dev.20220105/.

CookieBadger avatar Jan 29 '23 15:01 CookieBadger

After bisecting up until 3 revisions, I am confident, that https://github.com/godotengine/godot/commit/6af77c7b090f9e49aa5176783bf7350f8f6ec2e2 introduced the bug.

CookieBadger avatar Jan 29 '23 21:01 CookieBadger

CC @TokageItLab

clayjohn avatar Jan 29 '23 22:01 clayjohn

I have already know it is due to #53684. I'll take a look later.

TokageItLab avatar Jan 29 '23 22:01 TokageItLab

@ExquisiterEmil Okay, I sent #72362. Please test it if you can.

TokageItLab avatar Jan 30 '23 08:01 TokageItLab

@TokageItLab Works! Thank you! 👍

CookieBadger avatar Jan 30 '23 12:01 CookieBadger