What’s the best way to implement a pan-able zoomable game map with Cocos2d for iPhone. It would be like Mobile Safari except with a game map that doesn’t fit completely on screen. Or like how it’s done with Angry Birds, Cut the rope, etc.
This would not be a side scrolling game, just a fixed game area that you can zoom in/out of.
I’m new so if there are tutorials for this that would be great.
Thanks
I wouldn’t overwrite the visit function… just add your layer to the touch dispatcher:
And implement the delegate functions:
inside this functions if you notice that the user is panning/zooming, just update the scene position / scale properties.
To find if the user is panning or zooming, check this InputController helper class here: https://github.com/caxaria/LoopingMenu
Hope it helps,