titmael Posted May 10, 2014 Share Posted May 10, 2014 Hi, I tried a lot of ways but didn't find a good one (even on the forum didn't find). I have a world with bounds (wider than what my camera can see) and have a mouse listener so when player hit an edge it moves the camera if we are not touching world bounds, that's ok. I have a function to scale the world when user uses his mousewheel, works perfectly. I have some sprites fixedToCamera to get an UI. But when the player zooms in or out, UI scales too, and of course I don't want it to scale. I tried to scale world or camera, I tried to revert the scale on thoses sprites but no success. I really need to scale the world to let the player move around with camera, I need a "real" zoom in/out and let the player continue moving with the camera when zoomed in/out. edit : I hope I don't have to handle it externaly to Phaser (pure js and css) ?! Thx Link to comment Share on other sites More sharing options...
titmael Posted May 11, 2014 Author Share Posted May 11, 2014 Fly up little topic Link to comment Share on other sites More sharing options...
farzher Posted May 11, 2014 Share Posted May 11, 2014 My game is a little different, I'm not using the camera at all, but maybe this helps.I have two groups: the game group and the UI group.I `scale` the game group, and change its `pivot` point to move it around. Link to comment Share on other sites More sharing options...
titmael Posted May 11, 2014 Author Share Posted May 11, 2014 To be a bit more clear my game is about a land. I have a small land at the beggining and will be able to purchase near lands later.The player can move the camera around his land to see what is available or lately in the game to 'walk' across lands. So if I scale up (zoom in) a group of sprites, I think I won't be able to move to my game edges no ? Sprites will be bigger but my world not. I don't know if I'm right or not Link to comment Share on other sites More sharing options...
farzher Posted May 11, 2014 Share Posted May 11, 2014 Yeah, I think you would run into some mathematical difficulty trying to figure out where the edges of a scaled group are.idk :s Link to comment Share on other sites More sharing options...
valueerror Posted August 24, 2014 Share Posted August 24, 2014 im searching for a good way to zoom out to get a better view over the whole map (like in angry birds) could you please provide a piece of code or point me into the right direction on how to do this?thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts