Keeping a material "upright"

I think I know what you mean. Is it something like this?
http://www.chrisalbeluhn.com/UDK_Asset_Position_Offsets_Texturet_Tutorial.html
That should work for UE4 too. The example there is a little more complex, but the basic principles, using Object World Position hopefully still works.