Detecting if camera is upside down in material editor

Hello,

Title pretty much says all, how can I check in material editor if camera is turned upside down?
Camera Direction Vector alone does not provide enough information, I need to somehow get camera roll around its direction vector.

Thanks in advance.

What you can do is use the Player Controller to update, trough Tick or other means, check your rotation (since I guess that will control your camera’s rotation) and if that rotation is => 180 or <= -180 degrees then change a parameter in the material you wish to change.

For more information, check out “Dynamic Material Instance” and “Material Parameters”

Edit: Also if your Camera doesn’t follow your player’s rotation then you should create a new blueprint and choose Camera Actor, then you can have your rotation blueprint there.

I was hoping for more “universal” way, so I could reuse shader without additional bluprints, but that does it, thanks.