Hi,
I am using a tk2dCamera with a native resolution of 768x1024 (iPad Wide), and I've also created a 480x320 override (iPhone wide).
I have several draggable tk2dsprites, and what I want to do is:
- When I click and hold on a sprite I want to drag them around the screen
- This is working fine
- When my Input.mousePosition lands inside some given predefined boxes I want to lock the tk2dsprite within the box
- Input.mousePosition information is also fine on different screen resolutions (i.e.: Top right on the iPad reads x: 768.0 and y: 1024.0, on the iPhone it reads x: 480.0 y: 320.0).
- I've defined the boxes as empty gameObjects with box colliders, only to have a reference on the size of the lock boxes compared with my background sprite, I didn't intended to use them to check collision
And this is where my problems begin...
If I check the position of the box colliders when running on iPad wide everything's fine. As reference, one of the boxes' transform.position read (106.0, 655.0, 500.0f). Placing it on the top left corner of my screen. And the game works as expected, drag and drop the sprites on the boxes work like a charm.
However, when I switch the platform to iPhone, the sprites rescale correctly, but the same box reads the same transform.position of (106.0, 655.0, 500.0), effectively putting it OUTSIDE of the screen (since the iPhones' height is 480).
I hope the description is clear enough... What am I doing here?
Thanks in advance