I want to show sunlight from sunrise to sunset in my application. For that I need sunrise time , sunset time and direction of sunlight at each hour/interval. I can get sunrise and sunset time from shadow info. How to get the direction of sun light at each hour ? I’m open to other solution also .
You want to know the direction of the sun, and you notice that shadow info contains a vector SunDirection. This is for the current time and date, so you need to set the current time to a different time (for each hour) by setting ShadowTime and then reading the updated vector.
You wanted to get it at each hour. If you just want to get it only at a specific time-point, just set the shadow time to that time-point and get that single sun direction.