0 votes

I want to have a day-night cycle using a procedural sky, but I am not sure how to get or set the value for the sun_latitude property. I read the documentation but I'm still confused on how to do it. I thought maybe sun.get_environment(ProceduralSky.get_sun_latitude()) would work but it errors out. How can I achieve this?

Thanks for the help in advance.

Godot version 3.3 Stable
in Engine by (12 points)

1 Answer

0 votes

get_viewport().world.environment.background_sky.sun_latitude is what you're looking for I think. You could also of course use the environment property of any WorldEnvironment node you might have in the scene instead of get_viewport().environment

In Godot 3 most get/set methods are replaced by properties you simply read from or write to.

by (1,087 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.