Announcement

Collapse
No announcement yet.

Get directional light direction

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get directional light direction

    Hi everyone,
    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.
    thank you.

    #2
    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...tor/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...uct/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.

    Comment

    Working...
    X