diff --git a/world/World.gd b/world/World.gd index d273cb0..b1fd2f8 100644 --- a/world/World.gd +++ b/world/World.gd @@ -13,7 +13,7 @@ func draw_world(): st.add_smooth_group(true) for triangle in terrain.get_triangles(): for point in triangle.points(): - st.add_vertex(point.point3d()) + st.add_vertex(point.point3d() * Vector3(1, 24*5, 1)) st.generate_normals() st.generate_tangents() @@ -23,7 +23,7 @@ func draw_world(): var mi = MeshInstance.new() mi.mesh = mesh - var material = load("res://world/world.tres") + var material = load("res://world/world.material") mi.set_surface_material(0, material) mi.create_trimesh_collision() mi.cast_shadow = GeometryInstance.SHADOW_CASTING_SETTING_ON diff --git a/world/game.gd b/world/game.gd index b1afcf0..0c8d105 100644 --- a/world/game.gd +++ b/world/game.gd @@ -121,7 +121,7 @@ func point_find_elevation(point): elevation = min(elevation, 1) - # elevation = elevation * terraces + elevation = round(elevation * terraces) / terraces return elevation func point_is_water(point): diff --git a/world/game.tscn b/world/game.tscn index e8339b9..00c45f4 100644 --- a/world/game.tscn +++ b/world/game.tscn @@ -21,7 +21,7 @@ scale = Vector2( 0.25, 0.25 ) script = ExtResource( 4 ) [node name="Water" type="MeshInstance" parent="World"] -visible = false +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1000, 0, 1000 ) mesh = SubResource( 1 ) [node name="WorldEnvironment" type="WorldEnvironment" parent="World"] @@ -29,6 +29,10 @@ environment = ExtResource( 3 ) [node name="CamBase" parent="World" instance=ExtResource( 5 )] +[node name="DirectionalLight" type="DirectionalLight" parent="World"] +transform = Transform( 1, 0, 0, 0, 0.41636, 0.9092, 0, -0.9092, 0.41636, 0, 1.41623, 0 ) +light_energy = 0.1 + [connection signal="world_loaded" from="." to="UI/Map" method="_on_Game_world_loaded"] [connection signal="world_loaded" from="." to="World" method="_on_Game_world_loaded"] diff --git a/world/world.material b/world/world.material new file mode 100644 index 0000000..e4ba4f6 Binary files /dev/null and b/world/world.material differ