godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.57k stars 21.27k forks source link

Incorrect click detection in GraphEdit #52193

Closed MagdielM closed 3 years ago

MagdielM commented 3 years ago

Godot version

v3.3.3 stable (Mono build)

System information

Windows 10

Issue description

The range at which a connection can be dragged out from a GraphNode pin extends beyond the size of the pin on screen, and even beyond the edge of the GraphNode itself. Interestingly, this issue only applies to the right and bottom sides of the GraphNode.

https://user-images.githubusercontent.com/56076033/131225620-4488770c-5350-4623-a54b-02e0511ccd3a.mp4

At any zoom level below default, the range at which a GraphNode can be dragged and moved also extends beyond its size on screen.

https://user-images.githubusercontent.com/56076033/131225757-8bf71e16-b2c6-4d22-a5dd-bcec40ed9375.mp4

Steps to reproduce

In an empty project:

  1. Create any graph-based resource (VisualScript, VisualShader, etc.).
  2. Place any node on the graph.
  3. Attempt to drag from just outside of the edge of the GraphNode around the area where any of the pins may be, either to the right or below it.
  4. Zoom out once.
  5. Attempt to drag and move the GraphNode from just outside of its right or bottom edge.

From the reproduction project:

  1. Open the "Node.vs" file.
  2. Follow steps 3 through 5 of the previous instructions with the Constant GraphNode.

Minimal reproduction project

GraphEditClickTest.zip

kleonc commented 3 years ago

The range at which a connection can be dragged out from a GraphNode pin extends beyond the size of the pin on screen, and even beyond the edge of the GraphNode itself.

Hot zones for pins are expanded outside of the node intentionally. However, in 3.3.3 (and in the current state of 3.x branch) they're indeed fixed size rects which aren't affected by the zoom. But it's already fixed in master, see: #51517. And as you can see that PR is already marked to be cherry-picked for 3.x (so it will be fixed in 3.4).

Interestingly, this issue only applies to the right and bottom sides of the GraphNode.

I can do the same for the left side (3.3.3).

At any zoom level below default, the range at which a GraphNode can be dragged and moved also extends beyond its size on screen.

This is already fixed for 3.x (most likely in #47173), e.g. in 3.4.beta4 it's no longer an issue.

akien-mga commented 3 years ago

Fixed by #51517.