Zoom in
Hi! I have a problem
I want to make a camera zoom in for zoom out.
I have like example the template Tshirtbooth(camera zoom)
but I want to make opposite.
I want to make a camera zoom in for zoom out.
I have like example the template Tshirtbooth(camera zoom)
but I want to make opposite.
Best Answer
-
gyroscope I am here.Posts: 6,598
Hi @nanygames
i haven't seen @tshirtbooth's camera zoom template but I guess he's using the interpolate behaviour on the Camera width and height. So to zoom back out, just use two more interpolate behaviours to set the camera back to the screen size you're using.""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Answers
because I don't know make the rules
Thanks.
Whoops, got my zoom ins and outs muddled as to what you wanted; just re-read your post! Although camera zoom in is the same principle as camera zoom out. Not sure why you've not taken this info from TSB's template if it involves camera zoom, but still:
As I say, either involves using the Interpolate behaviour, so for zoom in (this example assumes you're using iPhone size, landscape):
Interpolate scene.Camera.Size.Width to 120 --- or whatever you want here
Interpolate scene.Camera.Size.Width to 80 --- or whatever you want here
As mentioned, to zoom back out again to normal camera size:
Interpolate scene.Camera.Size.Width to 480
Interpolate scene.Camera.Size.Width to 320
You can also interpolate the origin, which means you can have the camera zoom to any point on the screen. For this you change the scene.Camera.origin.X and scene.Camera.origin.Y
If you do change the origin though, remember to change it back to the centre of the screen when you zoom out again (if that's what you want).
Hope that's sorted it for you.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps