gui.pick_node() is not working as expected with offset coordinates on Android and iPhone.
I have created a reproduction project here:
A pie node is displayed slightly above the touch point, and its color changes when the pie’s position overlaps with a box node.
When testing on mobile, the Y-coordinate detection is off.
No issues occur during testing on Windows or macOS.
1 Like
Pawel
September 30, 2026, 1:12pm
2
Thanks for repro project! I created an issue to track this:
opened 01:11PM - 30 Sep 26 UTC
bug
**Describe the bug (REQUIRED)**
`gui.pick_node()` appears to use incorrect Y coo… rdinates on Android and iOS when GUI nodes are positioned with an offset relative to the touch position.
In the reproduction project, a pie node is displayed slightly above the current touch position. Its color changes when `gui.pick_node()` detects that the pie node overlaps a box node.
On desktop platforms the visual position and the position used by gui.pick_node() match correctly.
On Android and iOS, however, the Y coordinate used for hit detection appears to be offset, causing gui.pick_node() to report an overlap at a different position than the one displayed on screen.
**To Reproduce (REQUIRED)**
Steps to reproduce the behavior:
1. Open the reproduction project:
vtvitzh/report → 20260727/Mobile Game
2. Build and run the project on an Android or iOS device.
3. Touch and move your finger on the screen.
4. A pie node is displayed slightly above the touch position.
5. Move the pie node toward the box node and observe when its color changes.
**Expected behavior (REQUIRED)**
gui.pick_node() should test the actual displayed position of the GUI node.
**Defold version (REQUIRED):**
- Version [e.g. 1.2.155]
**Platforms (REQUIRED):**
- Android
- iOS
The issue seems to be specific to mobile platforms, since the same project behaves correctly on PC.
**Minimal repro case project (OPTIONAL):**
[Please attach a minimal project where the bug is reproduced. This will greatly help the person trying to investigate and fix the bug.](https://github.com/vtvitzh/report/tree/main/20260727/Mobile%20Game)
Forum discussion:
https://forum.defold.com/t/gui-pick-node-is-not-working-as-expected-with-offset-coordinates-on-android-and-iphone/83062
**Workaround (OPTIONAL):**
If there is a workaround, please describe it here.
**Screenshots (OPTIONAL):**
If applicable, add screenshots to help explain your problem.
**Additional context (OPTIONAL):**
Add any other context about the problem here.
2 Likes
britzl
October 1, 2026, 2:24pm
3
@vtvitzh we have replied to the issue on GitHub with our findings. You were not providing correct coordinates.
1 Like
Thank you for your assistance!
I have confirmed that the proposed fix resolves the issue.
1 Like