Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Zooming with the Camera?


LuckieLordie
 Share

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! 

 

Link to comment
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).

Link to comment
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! 

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...