|
how do i get a set texture to scroll from left to right, and or change a materials image over time?
(comments are locked)
|
|
http://www.unifycommunity.com/wiki/index.php?title=Animating_Tiled_texture That script will step through a texture sheet. The important bit is this particular line of code
With that you can also write a script that animates offset over time smoothly. In fact, here's an example of one:
For changing the image, the most efficient way is to use a tiling texture, but if you must use different source images, you can use this: http://unity3d.com/support/documentation/ScriptReference/Material-mainTexture.html I.e. awesome!!.......
Sep 02 '10 at 01:15 PM
Bentford
Thanks. This is a lot easier than having to set all the vertex UVs separately!
Jun 06 '11 at 11:43 AM
bernardfrancois
Great work....!! Worked for me too....
Jul 06 '12 at 04:33 AM
hirenkacha
superb man you are awesome thanks for this solution (y)
Jan 26 at 08:03 AM
Sanky
(comments are locked)
|
|
How can you control the offset with Camera.main.transform.eulerAngles.y ? I'd like to scroll the texture based on the camera rotation instead of time.
(comments are locked)
|
