Sun disc won't follow Dominand Directional Light correctly

This one has me pretty stumped.

If you create a new scene using one of the base map templates, the sun disc will perfectly follow the DDL rotation.

However, if you delete the default DDL and add new one (and use the same settings as the default one was using) the alignment with the sun disc is off. See this example:

https://content.screencast.com/users//folders/Jing/media/4961d19c-855f-438c-83f5-acae1ba6bb63/2019-04-08_1551.png

The sun disc will still rotate with the newly placed DDL, but it won’t correctly align between the player’s view and the light originating from the DDL.

What is so special about the default DDL that is preventing me from placing and using my own?

It happens, because light shafts have limited projection distance, while sun simply uses light vector.
You can fix it by changing TraceDistance in DDL properties to higher value.

Thanks for the response @Avatarus. However both of these examples have the same trace distance set.

The only difference between the two is the first DDL is pre-placed in the template map, the second is one i’ve manually added (after deleting the pre-placed one).

You can try it yourself very quickly.

Does anyone know where the logic is that updates the sun disc position in the sky sphere based on the dominant directional light?

if your using matinee call the Update().I ran the updated(); in login(); on the player joining. That fix our problem with sun not being in right spot.

@Avatarus My apologies, you were totally correct. It was the TraceDistance causing the problem. I increase it and now the sun disc aligns with the DDL light.

I’ve also discovered that increasing the Trace Distance (above 55000) prevents a light function being used on it (which was why I was debugging this in the first place).

Thank you for helping out with this, much appreciated!

The sun is rendered by skybox material, MapTemplates.Sky.M_Procedural_Sky_MASTER02
It only looks good in conjunction with light shafts.