I want to animate a section of a cylinder that changes colour and follows the path of the cylinder. Below, I've quickly illustrated what I'd like. I want the green section to move left-to-right and then following the path continuing towards the camera.
How can I achieve this? I note this answer, but it isn't quite what I'm after. It's only along one direction (X, Y or Z). I want the colour change to follow the cylinder regardless of what direction it's moving in.
I am following Maulik Sharma's suggestion and it works nicely. However, the way that I'm constructing my cylinder is causing issues with the UV unwrap. I generate the cylinder, scale it into the mirror and then difference bool the cylinder with the mirror to leave this face:

Now, I simply extrude this face along a direction:

The UV unwrap for an object like this is quite unruly and doesn't allow the 'colour' change to flow properly:
What's a better way to generate my cylinder so that this doesn't happen?





