Download

How can I make the material move the object in the direction of the normal?

I have some trees, and i wanted to have some kind of wind blowing into them. To achieve this I used the same method I used for the grass: A panner and a sine wave in the World Position Offset. This is the material I used:
73e15c38431056b8be40ec1c4d8789d10013f44a.png
The problem is:
The leaves (a bunch of planes with an opacity mask) will only move perfectly sideways. How can I make them move in the direction of their normal or their tangent?

You’re only putting a scalar into world position offset. Multiply that value by VertexNormalWS.