eZcT4tVJaA
291c0b0a6b90ac949185540c1b7877385e38ebe5 2 690x386.gif

Spent some time with it. I was wondering whether we shouldn't be able to scroll the UV rays in the material. Why not change the network and scroll the UV rays there directly?
Thrown it together pretty quickly. Not ideal for memory reasons, but who cares? :Joy:

code
// Update is called once per frame
void update ()
{
if (_autoScroll)
{
for (int i = 0; i <_uvs.Length; i ++)
{
_uvs (i) + = _scrollSpeed ​​* Time.deltaTime;
}}
}}
otherwise if (_lastOffset! = _uvOffset)
{
for (int i = 0; i <_uvs.Length; i ++)
{
_uvs (i) + = _lastOffset – _uvOffset;
}}

_lastOffset = _uvOffset;
}}

_meshFilter.sharedMesh.SetUVs (0, _uvs);
}}

Texture here is the wood from the first picture.

LEAVE A REPLY

Please enter your comment!
Please enter your name here