How to have UVs dependant of mesh position?

Hello,

I’m using the material M_Caustics I found on the Cave example to create a caustic effect.
I use this material on a spotlight as a light function, and I’ll attach this spotlight above the head of my player (in a Z independant axis).

The problem I’m facing is that when the player moves, my caustics moves too…
How can I do so that when the spotlight moves, the UV of the material moves too and so we can’t see that the spotlight is moving ingame?

I know the Panner node can help me on this but I can’t find out how to make it work.

Here’s the material graph:
http://puu.sh/ablI4/e644afc9dd.png

Hi Shelby -

Actually you want to align and tile your texture off of world posisiton and then pan it at the same time. Here is the material that mixes the world aligned texture material function with the Caustic panning.

Thank You -

Eric Ketchum

Thank you very much! :slight_smile: