Rotating sky in C#

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kupher

I have been playing around with paronama sky animating Day/Night cycle in C#, while using this line:

SkySphere.Environment.SetSkyRotationDegrees(new Vector3(0, timeOf, 0));
(timeOf is the calculated time of the day variable)

it works but I get this problem in VS Code:

[deprecated] void Godot.Environment.SetSkyRotationDegrees(Vector3 eulerDegrees)
‘Environment.SetSkyRotationDegrees(Vector3)’ is obsolete: ‘SetSkyRotationDegrees is deprecated. Use the BackgroundSkyRotationDegrees property instead.’ [SkySphere_Demo]

My questions is how do we use BackgroundSkyRotationDegrees property?

:bust_in_silhouette: Reply From: Andrea

i think the explanation is pretty clear: the SetSkyRotationDegrees() method you are using is depecrated (i think it will likely be removed in future versions), and it is suggesting to set the BackgroundSkyRotationDegrees property directly

So do you know how you’d set the property directly with c#, mostly for automation reason’s since we’ll probably loose SetSkyRotationDegrees() method in the future. I also checked for BackgorundSkyRotationDegrees Property Implimantation and there’s nothing currently.

kupher | 2021-01-16 13:28

i’m no C# expert, but in GDscript would be


isnt it the same in c?

Andrea | 2021-01-16 14:20