Sprite2D Position Drag Error When Parent Sprite2D is Rotated and Child Sprite2D scale is unlinked and Changed #82643
Closed
Description
opened on Oct 1, 2023
Godot version
4.1.1.stable
System information
Windows 11
Issue description
When using the select mode tool to change a child Sprite2D's position in the editor window, the sprite will move unexpectedly. The rotation of the parent sprite, when set to some number other than 0, and the child sprite, unlinked in scale, and set to a ratio other than 1:1 causes will cause this. The more drastic the ratio, such as 1:5 or 1:20, the more intense sprite moves in the unintended direction.
The Child sprite should remain under the mouse cursor and move to the desired location regardless of parent node rotation or child node scale imbalance.
Steps to reproduce
- Open 2D scene editor
- Create a Sprite2D Node
- Add a texture for visualization
- Add a child Sprite2D node to the 1st Sprite2D, and again add a texture
- Rotate the parent node an arbitrary non-zero angle, 45 degrees works well
- Unlink the child node's scale and change the node to a non 1:1 ratio. The more intense the ratio, the more noticeable
- Using the editor window, drag the child Sprite using the select tool or the transform tool
- Observe that the sprite no longer follows the mouse to its desired drag location.
Activity