Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag preview is affected by CanvasLayer offset #97748

Closed
peter-kish opened this issue Oct 2, 2024 · 1 comment · Fixed by #98032
Closed

Drag preview is affected by CanvasLayer offset #97748

peter-kish opened this issue Oct 2, 2024 · 1 comment · Fixed by #98032

Comments

@peter-kish
Copy link

Tested versions

  • Reproducible in: v4.4.dev2.official [97ef3c8], v4.3.stable.official [77dcf97]

System information

Godot v4.3.stable - Ubuntu 24.04.1 LTS 24.04 - X11 - Vulkan (Forward+) - integrated Intel(R) Xe Graphics (TGL GT2) - 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 Threads)

Issue description

Dragging a Control node that is located within a CanvasLayer that has an offset results in the drag preview having the same offset:
Peek 2024-10-02 20-56

Steps to reproduce

  1. Create a CanvasLayer node and set its offset to a non-zero value
  2. Create a Control node (e.g. TextureRect) with the CanvasLayer as its (direct or indirect) parent
  3. Attach a script to the Control node and implement _get_drag_data. E.g.:
func _get_drag_data(_at_position: Vector2) -> Variant:
    set_drag_preview(self.duplicate())
    return self
  1. Run the scene and drag the Control node around

Minimal reproduction project (MRP)

dragndropbug.zip

@Sauermann
Copy link
Contributor

Sauermann commented Oct 2, 2024

Reproducible in v4.0.stable.official [92bee43]
Related to #67186

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

Successfully merging a pull request may close this issue.

3 participants