Cycles mapping node - rotation pivot I'm currently creating a dial where the needle is a separate texture. I would like to be able to turn the needle around the dial via the mapping node, as this will allow me to randomize the needle's position for multiple instances.



However, when using the mapping node and adjusting the "rotate" value, the needle does not spin around the center of the UV map (0-1 UV space). It instead rotates around...somewhere else.




How can I get it to properly rotate around the center of the dial?

Blend file:
The pivot of an image will always be at the origin, which Blender defines as the bottom left.

The trick to moving the pivot is to actually move the image first, so that the point in the image that you want to be the pivot is over the bottom left (the actual pivot), then do your rotations, and then move it back where you want it.



The lighter orange area is the actual UV space (0-1), the darkened part is outside the UV space but still useful to visualize what's going on.

Notice how the first mapping node's location is negative, and the second mapping node's location is the same but positive.

0.5 is used here to place the pivot in the middle of the image, though you can use whatever values you like as long as they're the same for each mapping node, but inverse.