LuckieLordie Posted December 2, 2013 Share Posted December 2, 2013 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 More sharing options...
rich Posted December 3, 2013 Share Posted December 3, 2013 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). jerome 1 Link to comment Share on other sites More sharing options...
LuckieLordie Posted December 3, 2013 Author Share Posted December 3, 2013 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 More sharing options...
LuckieLordie Posted December 10, 2013 Author Share Posted December 10, 2013 Edit Changed to thread. Link to comment Share on other sites More sharing options...
Moe Posted March 5, 2014 Share Posted March 5, 2014 Hi is there a way to make the zoomig effect using phaser 1.1.6, layer.scale messed up the collision box, and didnot appear completely on the camera. any help would would be appreciated . Link to comment Share on other sites More sharing options...
ChubbRck Posted June 13, 2014 Share Posted June 13, 2014 How does one change the world's origin to the center of the screen? Link to comment Share on other sites More sharing options...
Recommended Posts