For that I calculated two variables called ‘Altitude’ and ‘Azimuth’ like in the picture above.
My Problem is when I update the rotation like in the following picture, I rotate the sun in
its own system. But I need to rotate it relative to the observer.
In the last picture I want to show you how it currently is and how it should be.
The red line shows the rotation, if I only update the pitch with the altitude variable.
The green line shows the rotation, if I also update the yaw with the azimuth variable.
The yellow line shows how it should be.
The problem is that the sun is within the material (Standard Skydome). What means, its position is calculated by the position of my directional light.
So there is no pivot
Is it a logical error or is there a way I can transform the azimuth?
I’m not quite sure why this isn’t working, yaw should be applied before pitch in Rotators. Is this directional light attached to something else? One thing you can try is creating two Rotators, one for azimuth and one for altitude, and then combine them together using the Combine Rotators node. Then you can try both orders of combination, to see if one ordering solves your problem.