Zooming in/out

Hi all,

I was wondering if any of you could advise me on how I could do zooming in and out within an image?

For example I have an image for a level and when play is hit from the main menu, I want the level to start zoomed out, then zoom in on a certain area, then once the player has done something, zoom out again.

A bit like angry birds, when the level first starts you can see everything, then it zooms in around the bird area and when you fire, it zooms out again so you can see everything.

Any help is appreciated :slight_smile:

Alex

[import]uid: 120751 topic_id: 24893 reply_id: 324893[/import]

You’d have all the images in a group then do;
group.xScale, group.yScale = 2, 2

That’s an example that would double the size, making things appear zoomed in.

You’d set it back to 1, 1 again to “zoom” out. [import]uid: 52491 topic_id: 24893 reply_id: 101208[/import]

I’ll add to this as I have recently to a similar post… If you’re using physics, then you really need to scale the entire GROUP. Peach indicates this but it should be emphasized. Physics objects will scale properly in a group, but they won’t scale individually (the image will, but the physics body won’t). [import]uid: 9747 topic_id: 24893 reply_id: 101215[/import]