Correction d'un bug lié au soleil qui ne se repositionnait pas correctement en fonction de l'heure.

This commit is contained in:
osquallo 2020-03-21 14:24:59 +01:00
parent 44f1d9239b
commit 342b806370
2 changed files with 5 additions and 5 deletions

View file

@ -20,8 +20,8 @@ noise = SubResource( 1 )
[sub_resource type="ShaderMaterial" id=5]
resource_local_to_scene = true
shader = ExtResource( 5 )
shader_param/iTime = 6165.88
shader_param/iFrame = 199437
shader_param/iTime = 6392.37
shader_param/iFrame = 208147
shader_param/COVERAGE = 0.5
shader_param/THICKNESS = 25.0
shader_param/ABSORPTION = 1.031
@ -72,7 +72,7 @@ texture = SubResource( 6 )
offset = Vector2( 640, 360 )
script = ExtResource( 6 )
editor_clouds_playing = true
day_time_hours = 3.67154
day_time_hours = 14.0283
directional_light_node_path = NodePath("../../../directional_light")
sun_position = Vector3( -1.15706e-06, 100, 8.66537e-06 )

View file

@ -23,9 +23,9 @@ func _process( delta ):
self.material.set("shader_param/iTime", iTime)
self.material.set("shader_param/iFrame", iFrame)
day_time_hours += delta
self.set_day_time_hours( self.day_time_hours + delta )
if day_time_hours >= 24:
day_time_hours = 0
self.set_day_time_hours( 0 )
func cov_scb(value):