Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile errors and update project to godot 4.4 #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 74 additions & 6 deletions hydro_demo/hydro/art/OceanShader.tres

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions hydro_demo/hydro/core/CubeCamera.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://dooypgkv3blau
1 change: 1 addition & 0 deletions hydro_demo/hydro/core/Gary.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://biw3n76dsxt6m
1 change: 1 addition & 0 deletions hydro_demo/hydro/core/OceanEditor.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://cn4kwg3bshamv
1 change: 1 addition & 0 deletions hydro_demo/hydro/core/ProjectedGrid.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://c40wd228touxx
1 change: 1 addition & 0 deletions hydro_demo/hydro/core/WaveConnector.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://t45vdx3fqtlk
15 changes: 12 additions & 3 deletions hydro_demo/hydro/scenes/Ocean3D.tscn
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[gd_scene load_steps=17 format=3 uid="uid://bcpwsk0fj0wy3"]
[gd_scene load_steps=18 format=3 uid="uid://bcpwsk0fj0wy3"]

[ext_resource type="PackedScene" uid="uid://dk8mbhuscqv0y" path="res://hydro/core/Gary.tscn" id="1"]
[ext_resource type="Material" uid="uid://bxeqrusqusk2b" path="res://hydro/art/OceanShader.tres" id="2"]
[ext_resource type="Script" path="res://hydro/core/ProjectedGrid.gd" id="3"]
[ext_resource type="Script" path="res://hydro/core/WaveConnector.gd" id="4"]
[ext_resource type="Script" uid="uid://c40wd228touxx" path="res://hydro/core/ProjectedGrid.gd" id="3"]
[ext_resource type="Script" uid="uid://t45vdx3fqtlk" path="res://hydro/core/WaveConnector.gd" id="4"]
[ext_resource type="PackedScene" uid="uid://crtva4iecvr22" path="res://hydro/uiux/Panel.tscn" id="5"]

[sub_resource type="ImmediateMesh" id="ImmediateMesh_sgb3a"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_f83p1"]
transparency = 1
albedo_color = Color(0.0431373, 0.462745, 1, 0.666667)
Expand Down Expand Up @@ -52,6 +54,7 @@ transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 46.
[node name="Ocean" type="MeshInstance3D" parent="."]
material_override = ExtResource("2")
transparency = 0.06
mesh = SubResource("ImmediateMesh_sgb3a")
script = ExtResource("3")

[node name="WaterPlane" type="MeshInstance3D" parent="."]
Expand All @@ -64,6 +67,7 @@ script = ExtResource("4")

[node name="CollisionShape" type="CollisionShape3D" parent="WaterArea3D"]
shape = SubResource("1")
debug_color = Color(0, 0.6, 0.7, 0.42)

[node name="Panel" parent="." instance=ExtResource("5")]
grow_vertical = 2
Expand All @@ -77,6 +81,7 @@ mesh = SubResource("2")

[node name="CollisionShape" type="CollisionShape3D" parent="Cube 1"]
shape = SubResource("3")
debug_color = Color(0, 0.6, 0.7, 0.42)

[node name="Cube 2" type="HydroRigidBody" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
Expand All @@ -87,6 +92,7 @@ mesh = SubResource("2")

[node name="CollisionShape" type="CollisionShape3D" parent="Cube 2"]
shape = SubResource("3")
debug_color = Color(0, 0.6, 0.7, 0.42)

[node name="Cube 3" type="HydroRigidBody" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 1, 0)
Expand All @@ -97,6 +103,7 @@ mesh = SubResource("2")

[node name="CollisionShape" type="CollisionShape3D" parent="Cube 3"]
shape = SubResource("3")
debug_color = Color(0, 0.6, 0.7, 0.42)

[node name="Boat 1" type="HydroRigidBody" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 1, -20)
Expand All @@ -107,6 +114,7 @@ mesh = SubResource("4")

[node name="CollisionShape" type="CollisionShape3D" parent="Boat 1"]
shape = SubResource("5")
debug_color = Color(0, 0.6, 0.7, 0.42)

[node name="WatercraftPropulsion" type="WatercraftPropulsion" parent="Boat 1"]
origin = Vector3(0, -1, 6)
Expand All @@ -133,6 +141,7 @@ mesh = SubResource("ImmediateMesh_j3w61")

[node name="CollisionShape" type="CollisionShape3D" parent="Boat 2"]
shape = SubResource("5")
debug_color = Color(0, 0.6, 0.7, 0.42)

[node name="WatercraftPropulsion" type="WatercraftPropulsion" parent="Boat 2"]
origin = Vector3(0, -1, 6)
Expand Down
12 changes: 6 additions & 6 deletions hydro_demo/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="HydroSimpleDemo"
run/main_scene="res://hydro/scenes/Ocean3D.tscn"
config/features=PackedStringArray("4.0")
config/features=PackedStringArray("4.4")
config/icon="res://icon.png"

[editor_plugins]
Expand All @@ -23,27 +23,27 @@ enabled=PackedStringArray()

move_forward={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_backward={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_left={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_right={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
toggle_mouse={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":0,"echo":false,"script":null)
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}

Expand Down
3 changes: 2 additions & 1 deletion src/hydro_rigid_body.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#define WATERCRAFT_BODY_H

#include "clippable_mesh.h"
#include "scene/3d/physics_body_3d.h"
#include "scene/3d/physics/rigid_body_3d.h"
#include "scene/3d/physics/physics_body_3d.h"

class ImmediateMesh;
class MeshInstance;
Expand Down
2 changes: 1 addition & 1 deletion src/water_area.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef WATER_AREA_H
#define WATER_AREA_H

#include "scene/3d/area_3d.h"
#include "scene/3d/physics/area_3d.h"

class WaterArea3D : public Area3D {
GDCLASS(WaterArea3D, Area3D)
Expand Down