Zooming camera does not allow touch and drag of other actors...
scitunes
Member, Sous Chef Posts: 4,047
Need some help here...
If I zoom the camera out I can see more of the scene (duh), but when I touch an actor that can normally be dragged around it does not work when zoomed out (camera width and height larger than the normal iphone sizes). In fact I can't even get regular buttons to react to a single touch. When I am zoomed to the normal 480x320 everything works fine.
Any ideas how to make it so I can zoom out and still have touches work correctly?
If I zoom the camera out I can see more of the scene (duh), but when I touch an actor that can normally be dragged around it does not work when zoomed out (camera width and height larger than the normal iphone sizes). In fact I can't even get regular buttons to react to a single touch. When I am zoomed to the normal 480x320 everything works fine.
Any ideas how to make it so I can zoom out and still have touches work correctly?
Comments
If it's just mult-touch, create a zoom-slider (Button-like actor) for controlling the zoom.
This might be an issue with GameSalad... like when you try previewing an iPad game on an iPod Touch. It doesn't sense touches proportionately.
I remember playing around with 'divided by 2' or simpy (touch1.x)-240. Either way it then would allow me to actually touch the actor.
This however doesn't solve your problem with interacting with buttons, my game worked slightly different.
stu, I'll play around with something like that for my game. currently the zoomed in position is the normal size and the zoomed out is double the screen size so maybe I'll try constrrain to touch1x*2
any other ideas?
Are you trying to zoom out from 480x320 to 960x640?
I just tried the *2 and your right it doesn't work
Darren.
The touch is obviously registered to the screen X/Y, not the scene X/Y.. So you must just have to represent the button to the screen touch.
// red.
I suggested the creation of an invisible actor that is constrained to the offset of the zoom.
If an iPhone game is 1:1 at 480x320, what is the touch ratio when it's at 960x640? Figure out the difference and then constrain the actor to that difference. Then, make your actors react to collisions of the invisible actor, rather than touches.
I think that the real solution is for Gendai Games to implement a universal binary, because an iPad game will shrink to fit an iPod Touch (in test mode anyway)... but the touches don't work right. So, if the touches were zoom sensitive, we could get better zoom effects and universal binary support.
It seems like a small issue that could yield big results.