I had met a strange behavior in the game. The touch screen is shif down a lot on the y coordinator.
Environment:
The vendor of the android phone is xiaomi
The game uses gooey as the GUI system. The touch-to-node interaction is processed in the core part. > local over = gui.pick_node(component.node, action.x, action.y)
This is really a rare case. It works well most of the time on android phone. Here are some more information for the background:
In daily development, the game is started from the editor on windows and the whole team have never meet this issue till now. We use gooey as the gui system for more than half a year.
Recently the project is close to a milestone and we start to test it on device with about 50 internal users. This issue is reported the first time on last week.
I can share the custom scripts. The game also has 3D models, so camera is also added in certain worlds(via load different collection proxy. The screen video is captured in a pure 2D world.) render.zip (3.6 KB)
You’re rendering the gui with a different projection from the standard projection. This will affect how gui nodes are rendered and this will impact gui.pick_node() (unless you adjust mouse coordinates).
render.set_viewport(0, 0, rendercam.window.x, rendercam.window.y)
render.set_view(vmath.matrix4())
render.set_projection(self.gui_proj) -- gui_proj only calculated on update_window
render.disable_state(render.STATE_CULL_FACE)
Thanks.
The change is already made and till now i hadn’t met this issue again.
It’s hard to reproduce even with the origin code, so we will pay attention to this issue for a certain period.