Masking Texture ( constantly moving)

Hi,

I am currently working on a 2D game and a newbie to UNITY. I am trying to implement some animations .The thing i want to do is that ,mask a particular area of the texture(which is animating, say moving). I did the simple texture masking and it works fine.But the problem i am facing is that, the texture will be constantly moving and the mask will be static.So how to blend the mask ( attached to a game object) and the texture( which is animating) is attached to the other game object.I have attached a sample image to illustrate my problem.

whats the best approach to solve this problem.

Thanks

You could animate the uivmap

Mesh mesh = GetComponentInChildren().mesh;
Vector3[ ] vertices = mesh.vertices;
… ajust the vertices…
mesh.vertices = vertices;

Nice duck :stuck_out_tongue:

@ thpetsen :

I tried that way of doing it. But problem is that, my background is of irregular shape( say example hexagonal shape). So when try to change the vertices and the UV map, a portion of it gets visible ( couldnt get clipepd off). check the Image below.

638306--22803--$Region.jpg