From 9ea371191fa3673e73c8dca27904e3a287673060 Mon Sep 17 00:00:00 2001 From: osquallo Date: Sat, 28 Mar 2020 11:13:08 +0100 Subject: [PATCH] modif mineur --- scenes/decors/terrains/demo/demo.tscn | 3 +++ scenes/game/game.gd | 2 +- scenes/game/game.tscn | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scenes/decors/terrains/demo/demo.tscn b/scenes/decors/terrains/demo/demo.tscn index c934cd6..d89efc6 100644 --- a/scenes/decors/terrains/demo/demo.tscn +++ b/scenes/decors/terrains/demo/demo.tscn @@ -67,3 +67,6 @@ size = Vector2( 6, 6 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.074535, 0 ) mesh = SubResource( 2 ) material/0 = null + +[node name="start_position" type="Position3D" parent="."] +transform = Transform( -0.985319, 0, 0.170725, 0, 1, 0, -0.170725, 0, -0.985319, 0, 0.315908, 1.42271 ) diff --git a/scenes/game/game.gd b/scenes/game/game.gd index bb82109..0ea3947 100644 --- a/scenes/game/game.gd +++ b/scenes/game/game.gd @@ -65,7 +65,7 @@ func _process( delta ): self.mouse_delta = Vector2( 0.0, 0.0 ) # Water fx. - if $creatures/player/model/ra.translation.y <= ($level/demo/water.translation.y-2.5): + if $creatures/player/model/ra.global_transform.origin.y <= ($level/demo/water.translation.y-2.5): $water_fx.get_surface_material( 0 ).set_shader_param( "mist_level", 1.0 ) else: $water_fx.get_surface_material( 0 ).set_shader_param( "mist_level", 0.0 ) diff --git a/scenes/game/game.tscn b/scenes/game/game.tscn index 4cd2a23..39cd1fb 100644 --- a/scenes/game/game.tscn +++ b/scenes/game/game.tscn @@ -25,8 +25,8 @@ noise = SubResource( 1 ) [sub_resource type="ShaderMaterial" id=3] resource_local_to_scene = true shader = ExtResource( 5 ) -shader_param/iTime = 996.784 -shader_param/iFrame = 40980 +shader_param/iTime = 330.89 +shader_param/iFrame = 20619 shader_param/COVERAGE = 0.5 shader_param/THICKNESS = 25.0 shader_param/ABSORPTION = 1.031 @@ -121,6 +121,7 @@ transform = Transform( 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0 ) [node name="creatures" type="Spatial" parent="."] [node name="player" parent="creatures" instance=ExtResource( 1 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.59641, 12.4341 ) [node name="mist_fx" type="MeshInstance" parent="."] cast_shadow = 0