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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.