Skip to content

Sprite2D Position Drag Error When Parent Sprite2D is Rotated and Child Sprite2D scale is unlinked and Changed #82643

Closed
@gidgeesheep

Description

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

  1. Open 2D scene editor
  2. Create a Sprite2D Node
  3. Add a texture for visualization
  4. Add a child Sprite2D node to the 1st Sprite2D, and again add a texture
  5. Rotate the parent node an arbitrary non-zero angle, 45 degrees works well
  6. Unlink the child node's scale and change the node to a non 1:1 ratio. The more intense the ratio, the more noticeable
  7. Using the editor window, drag the child Sprite using the select tool or the transform tool
  8. Observe that the sprite no longer follows the mouse to its desired drag location.

Minimal reproduction project

Bug.zip

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions