Zoom IN and OUT like Tiny Wings App

I know there are alot of threads on zooming in and zooming out, but i was looking for a specific way of zooming which is automatically like the game Tiny Wings.

What i want to do is, i want the character to jump, and when it jumps high enough i want the camera to zoom out so it looks like the character is smaller in the sky and when it comes back down it zooms back in to the normal camera view that there was.

Is there a way that this could be done with game salad or?

Any advice and insight will be great. Thanks in advance

Comments

  • kinzuakinzua Member Posts: 554
    @DaGreatness its is an easy task to do, though it'll be heavy on the performance end. Either ways, to accomplish such a behaviour. U need to Constrain cam width to cam height and then constrain cam height to the speed of the actor.

    This way you'll have a zoom in behaviour working on an auto mode. Though you'll have to specify the min and max cam height. Hope this helps.
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Another way would be to use interpolate with the camera on specific game events.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
  • DaGreatnessDaGreatness Member Posts: 82
    @Kinzua - Thanks for the reply, could you please give like a example setup on how this would be done when you say you have to setup the constrain cam. Just so i can understand where to put in my figures and what i am looking for because I am a bit confused on, how it will auto zoom back in on the moving character. Thanks in advance!

    @HoneyTribeStudios - Thanks for the reply! When you mean interpolate in different game events, what do you mean by that?

    @Jamie_c - Thanks for the reply!!! I was looking at the snow man tutorial, and it seems to be something i am looking for, but instead of the snowman standing there, will it be possible for the actor to to be in a moving state and camera zooms out and in. Because I believe the moving actor is the snow ball correct? on which the camera is zooming in and out from? If it is the snow ball then i will just have to make my main character (actor) which is running up and down hills jumping with the same camera view correct? and will it be the same code which you did for angry snowman or a little different?

    I just want to clarify somethings and i am sorry if i am new, but i am trying my best to get up to speed with this. Thanks for all your replies!!!
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    edited October 2013
    For example you might want the camera to zoom out when character.position.y > 300

    And zoom in when character.position.y < 250

    So as long as you set the rules in an unlocked actor you can use interpolate on the camera to do this.

    So you could put the rule in the character itself. Or if your character actor is a prototype and so can't access scene attributes you could include in your character:

    When self.position > 300 change game.zoom to 1
    When self.position <250 change game.zoom to 2.

    Then in a different unlocked actor you could have:

    When game.zoom = 1 interpolate scene.camera.width to (whatever size you want)
    When game.zoom = 1 interpolate scene.camera.height to (whatever size you want)
    When game.zoom = 1 interpolate scene.camera.origin.x to (whatever you want)
    When game.zoom = 1 interpolate scene.camera.origin.y to (whatever you want)

    And different numbers for when game.zoom = 2
Sign In or Register to comment.