I’ve gotten a bit stuck trying to write a blueprint that swaps out a material based on the vertical angle between the player camera and an object.
Note : the direction the player camera is looking does not matter. All I care about is the vertical angle between the two.
I tried doing this just in the material blueprint and sorta kinda got it to work but it became very dependent on where the camera was pointing, and the result was not exactly what I was looking for, in that the materials changed across the polygon dependent on where the camera was (instead of a clean ‘flip’ from one color / material to another), but also it was taking into account the camera heading as well as pitch (because I did it with vectors and a dot product):
I want the entire object to instantaneously flip from one material to the next. It doesn’t really matter to me if I do it in the material, or the object blueprint, but some general guidance would be appreciated.