- Home /
Animate a river in Unity
I was using a river tool to make my river's, and when I ran the game to watch it, I realized that it was not animated. I watched a video of a river that had the material sliding along the UV coordinates, but I'm not sure how they did it. I've got the material, and the river has UV coordinates, but I'm not sure how to make it slide along the UV coordinates. Please help.
Answer by Evil-Dog · Sep 27, 2011 at 04:40 AM
I've animated a scrolling road by modifying the uv offset like this renderer.material.mainTextureOffset.y = myOffsetVar;
you'd change x or y depending on what you wanna do but yeah, try that.
Answer by Nidre · Dec 13, 2012 at 05:29 PM
Settings the material is not the best method for that kind of thing.It will copy material every time you do that.
I have posted a Script in my website that maps UV to the specified parts of a texture atlas.I am using a little bit extended version of that as UV animator on my project.So you might want to check it out i can explain further if you have problems with the script.