Problem with coordinates onTouchDown
by Oriol "Orgarus" Garcia · in iTorque 2D · 04/09/2012 (11:39 pm) · 5 replies
Hello there!
I started a few days ago to make some tests with the iTGB in my brand-new (and now full of finger prints :D) new iPad. After a few days watching like a stupid awesome graphics on the screen and being a pain in the ass for my wife ("Look at me sweetheart, look at what I've done!!HOHOHO"), yesterday I decided to dive in the events. Let's put a.... tachannn.... a BUTTON.
I'm using the genericButton behavior from the "Feature Demo". In the iPad simulator it works perfectly but in the device to make it work (change the frame of the button) I don't have to touch the button, I have to use my finger up in the yAxxis (ups! it sounds dirty) ... well, I paste an image on the thread that explains better what I'm trying to say
In the logs I've seen that when I run the game on the simulator the screen mode is 1024 x 768 whereas in the iPad the screen mode is 2048 x 1536 ("set screen mode 2048 x 1536 x 32, fullscreen, force it, dont repaint") so the problem is here probably, but I don't know how to change this.
Anyone knows what can I do to solve this? Please.
Thanks in advance.
I started a few days ago to make some tests with the iTGB in my brand-new (and now full of finger prints :D) new iPad. After a few days watching like a stupid awesome graphics on the screen and being a pain in the ass for my wife ("Look at me sweetheart, look at what I've done!!HOHOHO"), yesterday I decided to dive in the events. Let's put a.... tachannn.... a BUTTON.
I'm using the genericButton behavior from the "Feature Demo". In the iPad simulator it works perfectly but in the device to make it work (change the frame of the button) I don't have to touch the button, I have to use my finger up in the yAxxis (ups! it sounds dirty) ... well, I paste an image on the thread that explains better what I'm trying to say
In the logs I've seen that when I run the game on the simulator the screen mode is 1024 x 768 whereas in the iPad the screen mode is 2048 x 1536 ("set screen mode 2048 x 1536 x 32, fullscreen, force it, dont repaint") so the problem is here probably, but I don't know how to change this.
Anyone knows what can I do to solve this? Please.
Thanks in advance.
About the author
Recent Threads
#2
04/12/2012 (6:42 am)
We just got an iPad 3 at the office and quickly discovered the issue you just described. We have it logged in our bug tracker and will make sure the fix is in the next release. It has to do with the device's retina capabilities being enabled, but the actual TorqueScript canvas is still being set to 1024x768. I don't have time to dig in and provide a fix now (watching the baby), but I will take a crack at it when I get back to the office.
#3
04/12/2012 (9:19 am)
Surely you mean "The New iPad"? ;)
#4
First things first: congratulations for the baby :)
The positive side of the problem is that it makes me dive into the source code of the engine and I have to say... ¡OXYGEN PLEASE! :D
Thanks for the response.
04/12/2012 (9:36 pm)
Hi Michael,First things first: congratulations for the baby :)
The positive side of the problem is that it makes me dive into the source code of the engine and I have to say... ¡OXYGEN PLEASE! :D
Thanks for the response.
#5
I'm sure that you're feeling a bit of pressure; since you now have to support the new iPad in 1.5.1.
Priorities, man. Baby comes first.
You've got a lot of stuff on your plate right now. iT2D has to take second place. We all understand.
04/13/2012 (8:15 am)
Michael,I'm sure that you're feeling a bit of pressure; since you now have to support the new iPad in 1.5.1.
Priorities, man. Baby comes first.
You've got a lot of stuff on your plate right now. iT2D has to take second place. We all understand.
Torque Owner Oriol "Orgarus" Garcia
Default Studio Name
as I was waiting (still) for answer/s I've made some tests, one of them: use the Conor O'Kane's Bumblebee (thank you very much Conor for uploaded it, it's the most interesting "tutorial" about iTGB I can found around here), but the problem is the same.
I look to the xcode (where I'm absolutely unexperienced) window properties but instead the full screen at launch checkbox option and the frame rectangle view I don't see (and I don't know) what can I do.
With my limited knowledges a solution that I thought was to get the resolution of the iPad, and from there translate the coordinates of the touch and make it match with the object's coordinate. I use the getDesktopResolution() function and it returns 480x480 (¡¡¿what?!!), so now I'm totally lost.
Maybe the solution is stupid but I can't see it.
Come on boys, give me a hand please!