domza Posted August 25, 2015 Share Posted August 25, 2015 Hi there, Is there a way to ignore the global scale of world.scale? I am trying to "zoom in" by scaling the world, but I dont want this to affect my UI elements. I am currently have a method that I call on update that negates the scrolling, although it seems that my negating and the zooming are happening in different updates, so it makes my UI elements shake on the screen while they catch up. I am zooming in by changing the world.scale x and y in a tween, then calling this method every update:_onScaleChanged( scale ) { if ( this.ignoreGlobalScale ) { var ratio = 1 / scale; this.scaleX = ratio; this.scaleY = ratio; } }Any help would be greatly appreciated! Thanks,Dom Link to comment Share on other sites More sharing options...
rich Posted August 25, 2015 Share Posted August 25, 2015 Put your UI elements outside of the World. The World is just a Group that sits on the Stage, but if you do game.stage.addChild(UIGroup) then you could position your UI Group over the top of everything, and it won't get scaled if the world does. tips4design 1 Link to comment Share on other sites More sharing options...
Recommended Posts