Rotate mesh through material using World Position Offset

Is there a way to add the objects “orientation” in the scene. So that the objects rotate individually in “Local space” istead of all of them rotating in worldspace?