sombrelain Posted February 14, 2014 Share Posted February 14, 2014 Hey there, I'm new to Phaser development and am currently trying to build a zoomable, draggable world map. Dragging works fine, but I can't get the zooming to work correctly. The background of my world map is Sprite containing the background image. This sprite is in a Group with some other sprites (something like cities on the map). When I now scale the whole group using something like game.add.tween(mapGroup.scale).to({x: scaleX, y:scaleY}, 50, null, true);everything works fine, but the anchor for scaling is always the upper left corner. With Sprites, I can set the anchor property to define where the anchor of the scaling is located, how would I do that for a whole group? My goal is: If I point the mousecursor at let's say New York on the world map, then zoom in, the mousecursor should still be located at NY after the scaling. This is probably pretty obvious for someone experienced with 2D graphics development, any help would be greatly appreciated. Thanks a lot Link to comment Share on other sites More sharing options...
jdnichollsc Posted January 18, 2015 Share Posted January 18, 2015 Hi sombrelain! How did it go with this? Regards, Nicholls Link to comment Share on other sites More sharing options...
Recommended Posts