diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-09-12 20:45:03 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-09-12 20:45:03 -0400 |
commit | 99a70a8677f8d14749bdcd374f1631cd9cbbd3df (patch) | |
tree | 9d3cc5334ceb4e698009449c070bec3b4850629e /Main.tscn | |
parent | 5dbc9c05c1ebd33e37315c096d2c9e1c6b96a8f2 (diff) | |
download | godot_wildjam_49-99a70a8677f8d14749bdcd374f1631cd9cbbd3df.tar.gz godot_wildjam_49-99a70a8677f8d14749bdcd374f1631cd9cbbd3df.zip |
Add buoyancy simulation to water and floaties on the raft
Diffstat (limited to 'Main.tscn')
-rw-r--r-- | Main.tscn | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -1,7 +1,8 @@ -[gd_scene load_steps=18 format=2] +[gd_scene load_steps=19 format=2] [ext_resource path="res://character/fps_controller/fps_controller.tscn" type="PackedScene" id=1] [ext_resource path="res://icon.png" type="Texture" id=2] +[ext_resource path="res://Float.tscn" type="PackedScene" id=4] [ext_resource path="res://Water.gd" type="Script" id=5] [ext_resource path="res://Wave.gdshader" type="Shader" id=7] @@ -29,11 +30,11 @@ noise = SubResource( 17 ) [sub_resource type="ShaderMaterial" id=11] shader = ExtResource( 7 ) -shader_param/wave1 = Quat( 0.25, 0.10472, 2.38732, 1080.08 ) +shader_param/wave1 = Quat( 0.25, 0.10472, 2.38732, 1200.04 ) shader_param/wave1_dir = Vector2( 1, 1 ) -shader_param/wave2 = Quat( 0.25, 0.202683, 1.23345, 776.359 ) +shader_param/wave2 = Quat( 0.25, 0.202683, 1.23345, 862.583 ) shader_param/wave2_dir = Vector2( 1, 0.6 ) -shader_param/wave3 = Quat( 0.25, 0.349066, 0.716197, 591.586 ) +shader_param/wave3 = Quat( 0.25, 0.349066, 0.716197, 657.289 ) shader_param/wave3_dir = Vector2( 1, 1.3 ) shader_param/water_colour = Color( 0.694118, 0.945098, 0.941176, 0.368627 ) shader_param/deep_water_colour = Color( 0.25098, 0.623529, 0.788235, 0.54902 ) @@ -69,6 +70,9 @@ transform_array = PoolVector3Array( 0.35759, 0, -0.933879, 0, 1, 0, 0.933879, 0, transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.074, 0 ) [node name="Raft" type="RigidBody" parent="."] +mass = 2.0 +linear_damp = 0.8 +angular_damp = 2.0 [node name="CollisionShape" type="CollisionShape" parent="Raft"] shape = SubResource( 1 ) @@ -77,6 +81,18 @@ shape = SubResource( 1 ) mesh = SubResource( 2 ) material/0 = SubResource( 3 ) +[node name="Float" parent="Raft" instance=ExtResource( 4 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.98274, 0, -5.0045 ) + +[node name="Float2" parent="Raft" instance=ExtResource( 4 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.98274, 0, 5.02626 ) + +[node name="Float3" parent="Raft" instance=ExtResource( 4 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.0045, 0, -5.0045 ) + +[node name="Float4" parent="Raft" instance=ExtResource( 4 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.0045, 0, 5.02626 ) + [node name="DirectionalLight" type="DirectionalLight" parent="."] transform = Transform( 0.863334, 0.0994421, -0.494738, 0, 0.980392, 0.197058, 0.504633, -0.170127, 0.846406, -12.2908, 5.96757, 0 ) |