Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: pioj on May 03, 2012, 11:04:33 AM
-
Hi. Nice to meet u all!
There's a little issue with UISpriteAnimation script, as it rescales to pixel-perfect while the animation is playing.
It's located at the Update() method, line 60: mSprite.MakePixelPerfect();
This forces us to keep 1:1 pixel scale on sprites we want to be animated. I've tried adding one sprite to an empty parent, but sooner or later turns to be a chaos..
If you need to keep that instruction because of a glitch or something, I'd recommend you to take in count the actual scale for that sprite, too..
Does anyone else is using animated sprites in games?
-
It's necessary because one animation frame's size may not match the next. Think of a sprite that's standing still: it's tall and narrow. Now think of a running sprite: it's more square in shape. If you don't pixel-perfect the sprite, it will be stretched as you go from one sprite to the next. If you want to scale your animated sprite, scale its parent.