Universal Binary Ipad to Iphone Touch Offset help
Hi,
So I have a game that requires the player to touch the ball and "pull" it so that it will sling upwards. I have been using the camera fixes for Universal binary. The camera is correct on the Iphone 5, but when I try to touch the ball it moves to the side and I can never actually touch it. Is there a way to correct this? Does it have something to do with a touch offset?
It works fine on the Ipad (my original work started on the Ipad).
So I have a game that requires the player to touch the ball and "pull" it so that it will sling upwards. I have been using the camera fixes for Universal binary. The camera is correct on the Iphone 5, but when I try to touch the ball it moves to the side and I can never actually touch it. Is there a way to correct this? Does it have something to do with a touch offset?
It works fine on the Ipad (my original work started on the Ipad).
Comments
For eg.. if your cam originX is 1500 px and your heroX is 20 px away from the cam origin.. Your touch value of the hero will be 20 px. To get the appropriate touch you will need to add the cam origin value to it.
For eg. you could Constrain scene.touchX to cam.Orgin.X + device.touch.1.x and that'll hopefully return the desired results.
Read into your touch values with display text and debug your issue. Surely that will help. Let us know what you did.
The camera fixes I was talking about are the ones posted here that goes:
If game.screen.size heightg is 568 (for iphone 5) then
change attribute scene.camera.size.width to 1024
change attribute scene.camera.Origin.X to -128.
So what I did on my ball actor, when touch is pressed, change the self.position X to mouseposition X - 128.
Now I just need to differentiate it for Ipad, Iphone 5, and Iphone 4.
Btw, do you know how to fix the Pause function. It shifts the camera view when I enter into Pause. I heard its fixed on the nightly builds though.