Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: gregmax17 on December 06, 2012, 10:39:07 PM
-
Hello, I have a request in regards to the tiled sprite. I imagine this is easy to implement, but because I lack the math to do it, I hope someone here can do it :)
I would like to have the tiled sprite to be able to scroll. Scroll as in animate in X and/or Y direction. Similar to the sprite animation script, but it doesn't need to be a prefix. It will just use the same sprite (texture coordinates) and offset itself to appear as if it is scrolling/panning.
Does this make sense? I imagine this 'should' be easy.
-
Easy? no, because you can't just scroll UVs -- you have to scroll the actual geometry. It's not a texture. Sprites don't work that way. Even if you look at the tiled sprite's geometry you will see that it instantiates new quads for every instance of the sprite in order to make it appear like it's continuous.