Boat/ocean/Ocean_playground.tscn

95 lines
3.4 KiB
Text

[gd_scene load_steps=11 format=3 uid="uid://hs3a438it6j6"]
[ext_resource type="Material" uid="uid://djvstk5qjvdan" path="res://ocean/Ocean2.tres" id="1_kiaws"]
[ext_resource type="Script" uid="uid://c12fpc7inp27s" path="res://ocean/ocean.gd" id="2_ap626"]
[ext_resource type="PackedScene" uid="uid://babgqvkugifk1" path="res://boat/boat.tscn" id="3_ap626"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_kiaws"]
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
[sub_resource type="Sky" id="Sky_ap626"]
sky_material = SubResource("ProceduralSkyMaterial_kiaws")
[sub_resource type="Environment" id="Environment_2qsx7"]
background_mode = 2
sky = SubResource("Sky_ap626")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="PlaneMesh" id="PlaneMesh_mf4pf"]
material = ExtResource("1_kiaws")
size = Vector2(10, 10)
subdivide_width = 100
subdivide_depth = 100
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ap626"]
transparency = 1
blend_mode = 3
shading_mode = 0
diffuse_mode = 3
disable_fog = true
albedo_color = Color(0, 0.754224, 0.124756, 1)
[sub_resource type="SphereMesh" id="SphereMesh_2qsx7"]
material = SubResource("StandardMaterial3D_ap626")
radius = 0.2
height = 0.4
[sub_resource type="GDScript" id="GDScript_ap626"]
script/source = "extends MeshInstance3D
@export var ocean : Ocean #= get_tree().get_nodes_in_group(\"ocean\")[0]
func _process(_delta):
var depthwater = ocean.get_water_level(Vector3.ZERO)
global_position = Vector3(0.0,depthwater,0.0)
"
[node name="Node3D" type="Node3D"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_2qsx7")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 3.48773, 0)
shadow_enabled = true
[node name="Ocean" type="Node3D" parent="."]
[node name="Water_Tile_00" type="MeshInstance3D" parent="Ocean"]
mesh = SubResource("PlaneMesh_mf4pf")
skeleton = NodePath("../..")
script = ExtResource("2_ap626")
[node name="Water_Tile_02" type="MeshInstance3D" parent="Ocean"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 0)
mesh = SubResource("PlaneMesh_mf4pf")
skeleton = NodePath("../..")
script = ExtResource("2_ap626")
[node name="Water_Tile_01" type="MeshInstance3D" parent="Ocean"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10)
mesh = SubResource("PlaneMesh_mf4pf")
skeleton = NodePath("../..")
script = ExtResource("2_ap626")
[node name="Water_Tile_03" type="MeshInstance3D" parent="Ocean"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -10)
mesh = SubResource("PlaneMesh_mf4pf")
skeleton = NodePath("../..")
script = ExtResource("2_ap626")
[node name="Water_Tile_04" type="MeshInstance3D" parent="Ocean"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 0)
mesh = SubResource("PlaneMesh_mf4pf")
skeleton = NodePath("../..")
script = ExtResource("2_ap626")
[node name="Boat" parent="." node_paths=PackedStringArray("ocean") instance=ExtResource("3_ap626")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.461916, 0)
ocean = NodePath("../Ocean/Water_Tile_00")
[node name="MeshInstance3D" type="MeshInstance3D" parent="." node_paths=PackedStringArray("ocean")]
mesh = SubResource("SphereMesh_2qsx7")
script = SubResource("GDScript_ap626")
ocean = NodePath("../Ocean/Water_Tile_00")