This site requires JavaScript, please enable it in your browser!
Greenfoot back
Ethan243
Ethan243 wrote ...

2013/1/30

zoom in and out in mid-execution

Ethan243 Ethan243

2013/1/30

#
I need code so I can zoom in and out in mid execution.
danpost danpost

2013/1/30

#
A progressive zoom feature would be nice, but would require some experience with programming to accomplish. An instant zoom feature would be a bit easier to program, but is still somewhat involved (depending on what kind of scenario you are writing). You would need a world instance field of a numeric type to track the current zoom value ('int' for instant zoom or 'double' for progressive), and everything (and I mean everything -- the background and all the actor objects) will have to use that value to determine their size and their location in the world. To complicate matters worse, if you are able to zoom in at different points, everything will need to know where you zoomed in at to adjust their locations with that also. If you are willing to take on such an task, try some code; and if you run into some problems that you are having difficulty solving, post up. And best wishes.
You need to login to post a reply.