Help!! How to pinch and zoom like the angry birds

sky_ssrsky_ssr Member Posts: 58
edited November -1 in Working with GS (Mac)
The demos just worked for only one actor, I want to zoom in and out of the whole scene, thanks

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Here's something to keep in mind. Whenever you change the camera size so that it is not the same as the device screen size the touch coordinates will be off. So in other words getting your game to zoom properly is only the beginning. You will then need to develop a system to account for the camera offset and zoom ratio. Trust me it is a real pain in the ass. It can be done but it is really a pain.

    Tips for this:

    1)You will not be able to use "When touch is pressed". Instead you will need to use the touch rules from codemonkey's joystick demo and check if a touch actor is overlapping with the actor. But you will need to unlock each touch actor and in the camera offset if the things you are touching and draggin are not on the HUD (i.e. a bird in angry birds)

    2) Use the "camera to world coordinates" demo to understand the ratio and offset (search in the New section)

    3) Your HUD will also zoom. So if you don't want it to you will need to use constrains on each HUD item so that when you zoom in or out it will adjust.

    Good luck!
Sign In or Register to comment.