Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Antares88 on March 20, 2014, 07:23:31 AM
-
Hi,
I'd like to make a background filled with a tileable texture, and make it move (I'm trying to achieve a moving dust effect).
I see that I can move any widget attaching a UITweenPosition script to it, but I have no idea how to automatically tile the texture so it doesn't leave empty space when it moves.
I'm not sure if my explanation is understandable, so I found a random website that has the moving background effect that I'm trying to achieve:
http://getcharacters.com/
Thanks!
-
Watch the last video I posted. It explains exactly this.
-
Hi,
if you mean the video "NGUI: Atlas and Font Modifiers", I watched it, but my problem is not to make the texture tileable and to avoid lines on the edges.
My problem is to make so that when I move the texture with TweenPosition new tiles fill the empty void that is created.
I made a sketch:
-
Tiled sprite doesn't fill the screen. It fills the widget's rectangle. When you move the widget, its rectangle is moved, so the filled area is moved as well.
You can change UVs of UITexture, but you can't change UVs of a tiled sprite. However if I understand what you're trying to do correctly, you can achieve what you want by simply making the widget wider, and when the tween reaches the end, restart it from the beginning. If you set it up correctly where the visible tiled area at the end matches the same texture at the beginning, there won't be any visible transition when it restarts the tween.