Jump to content

Ignoring World.Scale?


Recommended Posts

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!




Link to comment
Share on other sites


  • Recently Browsing   0 members

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