[Edit 1]: Added material of components.
I have a flywheel with a shaft connected to it. The shaft rotates with the flywheel, but also rotates relative to it, to give me a kind of camshaft motion if you can imagine. I don't know why type of pin is best to use here, I've only pinned things that don't move relative to each other in the past.
I have added some images to try and describe this better, as you can see, the red rod always stays in the same orientation, that requires that it rotates relative to the flywheel while still moving with it. The red rod is made of aluminum, the flywheel is also made of aluminum. The black sliding component is a plastic bearing component.