I want to developpe a game based on a solar panel (SP), I want to compute the power delivred by the SP using the orientation of the SP and the sun.
My question is : How to get the orientation of the sun and the solar panel.
Assuming your SP is modelled with the front being the panels…
You would get the foward vector of your SP.
Then get the vector between the Sun and your SP (https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/Vector/GetDirectionVector/index.html)
The dot products of these two will give you a number you can use to represent how close they are to looking at each other. (https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/Vector/DotProduct/index.html)
the output of this node will be 1.0 if they are directly facing each other, 0.0 if they are perpendicular, and -1.0 if they are directly opposite each other.