Android world pos issue

I don’t really know how to call this topic or what this issue is really caused by, but I suspect my world pos code. I am trying to make a top down 2d game and I have only implemented a joystick and movement. On Pc everything runs well. The issue is on android. Something seems to break there. I don’t really know how to explain it so try it for yourself. Here is my project and apk.
Emboryo.zip (8.5 MB)
EmboryoApk.zip (7.9 MB)

Please try to explain the problem. You can’t really expect someone to install and run and try to figure out your problem. Can you share some screenshots?

When you say “world pos” issue I immediately think the problem lies in the difference in screen width and height of your Android phone compared to the width and height you have in game.project.

If you resize the Windsow on desktop does it mess up as well? Or can you change the windows to any size and have it work?

If resizing the window causes issues then you have what britzl mentions.

I have this joystick and when I touch the screen it should go there, which works. The issue appears when I try to use it, as it seems it has its “zero cords” offset by some amount, which is not persistent. This issue does not appear on PC though. Android footage: Watch Screenrecorder-2025-08-16-10-18-03-922[1] | Streamable

I took a look your project and saw that you’re using game objects and a camera component:

This means that you need to convert from the screen position to the world position. I see that you are doing it in your script, but you also have the joystick nested under your player game object which means that the joystick will inherit the player position. I see that you are compensating for this in the script, but honestly I think you are making things too hard for yourself. Why not use the gui for the joystick?

2 Likes