Zooming camera does not allow touch and drag of other actors...

scitunesscitunes Member, Sous Chef Posts: 4,047
edited November -1 in Working with GS (Mac)
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?

Comments

  • PhoticsPhotics Member Posts: 4,172
    Is it broken or are you having multi-touch issues?

    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.
  • StusAppsStusApps Member, PRO Posts: 1,352
    As I recall when zoomed in to a camera of 240x160 I had to change the x and y values by half. For example: my zoom only happened when you touched an actor but the constrain to touch position didn't work right until I changed to to constrain self.positionx to (touch1.x)/2.

    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.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Yeah, This is a problem with zooming and/or rotating the camera. I had to put a spacebar Rule to reset the camera in that demo I made as the buttons would not work when rotated or zoomed.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    thanks, guys.

    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
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    *2 on the touch constrains did not work. Not sure why changing camera size effects touch. weird...

    any other ideas?
  • UtopianGamesUtopianGames Member Posts: 5,692
    How big is your scene 960x640?

    Are you trying to zoom out from 480x320 to 960x640?

    I just tried the *2 and your right it doesn't work :(

    Darren.
  • reddotincreddotinc Member Posts: 653
    Any luck on this? Trying to work out the same!

    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.
  • PhoticsPhotics Member Posts: 4,172
    I thought I posted about this somewhere before.

    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.
Sign In or Register to comment.