LuckieLordie

Zooming with the Camera?

Recommended Posts

Hi! 

I'm trying to achieve a zooming effect for the game I'm working on and there doesn't seem to be a property for the camera that can do this for me.

 

I have a game where the player can move vertically and horozontally in the world. When the character moves vertically the camera needs to zoom out to keep the floor and player in view.

 

I was looking through the documentation and Camera has a property called "view" I wondered if I could use this? If not do you know any techniques I could use to get the effect?

 

Thanks! 

 

Share this post


Link to post
Share on other sites

In the dev branch is version 1.1.4 which contains a build where World and Group.scale are both fixed and working - so that is how you'd do it really. Either scale the entire World (note this will literally scale everything being displayed) or scale a specific Group of items. Remember the scaling takes place around 0,0 in the world, not the top-left of the screen (although 0,0 is positioned there by default).

Share this post


Link to post
Share on other sites

In the dev branch is version 1.1.4 which contains a build where World and Group.scale are both fixed and working - so that is how you'd do it really. Either scale the entire World (note this will literally scale everything being displayed) or scale a specific Group of items. Remember the scaling takes place around 0,0 in the world, not the top-left of the screen (although 0,0 is positioned there by default).

 

Brilliant! Cheers Rich. I already have my world extending from the origin so that should be fine! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.