How can I make a material that is the same color as the sky?

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

enter image description here

Don’t tell me I can just copy and paste the color code of the sky, because it won’t work at all (or is it?). The lightning affects the color. I want a material that will constantly the same color as the sky no matter whatever the lighting does. How can I achieve this in godot 4.0?

:bust_in_silhouette: Reply From: raouffndt

use a code that get sky color and put it on your object

var sky_color_code="your color code here"
var object _color_code=sky_color_code

every time sky color change that object color will get the same one
note:maybe you need use signals or global variable

dude… didn’t I said it won’t work? It doesn’t work because the lighting affects the object.

thebluetropics | 2023-02-03 06:29