How to offset a material UV coordinate according to velocity?

So I was unable to implement this not due to any flaw in the method, but because of a little quirk of the panner node in materials. Apparently, whenever you set a new speed value on it, the panner resets and starts over with the new speed. That’s what was responsible for the jittery track movement and the fact that I was simply unable to control the track speed. Instead of using the panner, I fell back to using Vigilante’s original method of manually adjusting the V offset of the track texture coordinates.

I had to do this on tick though. Slowed it down to 0.05. I used a timeline to control the track speed over time and simply modified the play rate of the timeline by mapping the play rate to the dot product of linear velocity of the root component and its forward vector, which I also used to check if the vehicle is going forward or backwards. Do Once is there to not override the timeline when its running, otherwise, the timeline keeps getting reset.



This actually works quite well.