diff --git a/.gitignore b/.gitignore index 7883f2a1..60760684 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ build/going.pck build/going.x86_64 build/going.exe build.zip + +*.o diff --git a/materials/forest.ptex b/materials/forest.ptex index 35ff9eec..1acfa14a 100644 --- a/materials/forest.ptex +++ b/materials/forest.ptex @@ -31,10 +31,10 @@ "to_port": 1 }, { - "from": "scratches", + "from": "splatter_color", "from_port": 0, - "to": "colorize", - "to_port": 0 + "to": "blend2_2", + "to_port": 1 }, { "from": "colorize", @@ -43,10 +43,46 @@ "to_port": 0 }, { - "from": "splatter_color", + "from": "fbm2", "from_port": 0, - "to": "blend2_2", + "to": "colorize", + "to_port": 0 + }, + { + "from": "graph", + "from_port": 1, + "to": "splatter_color_3", + "to_port": 0 + }, + { + "from": "shape_2", + "from_port": 0, + "to": "splatter_color_3", "to_port": 1 + }, + { + "from": "splatter_color_3", + "from_port": 0, + "to": "buffer_3", + "to_port": 0 + }, + { + "from": "buffer_3", + "from_port": 0, + "to": "splatter_color_4", + "to_port": 0 + }, + { + "from": "splatter_color_4", + "from_port": 0, + "to": "normal_map2", + "to_port": 0 + }, + { + "from": "normal_map2", + "from_port": 0, + "to": "Material", + "to_port": 4 } ], "label": "Graph", @@ -65,8 +101,8 @@ }, "name": "Material", "node_position": { - "x": 367.611938, - "y": 243.147049 + "x": -198.423416, + "y": 226.924652 }, "parameters": { "albedo_color": { @@ -80,7 +116,7 @@ "depth_scale": 0.5, "emission_energy": 1, "flags_transparent": true, - "metallic": 0, + "metallic": 0.5, "normal": 1, "roughness": 1, "size": 11, @@ -92,12 +128,12 @@ { "name": "splatter_color", "node_position": { - "x": -677.745056, - "y": 267.207703 + "x": -791.793091, + "y": 317.725281 }, "parameters": { - "count": 215, - "opacity": 0, + "count": 153, + "opacity": 0.46, "rotate": 33.6, "scale": 0, "scale_x": 0.5, @@ -106,6 +142,7 @@ "variations": false }, "seed_int": 1176364672, + "seed_locked": true, "type": "splatter_color" }, { @@ -176,12 +213,6 @@ "to": "mirror", "to_port": 0 }, - { - "from": "fbm2", - "from_port": 0, - "to": "math_8", - "to_port": 1 - }, { "from": "math_7", "from_port": 0, @@ -194,12 +225,6 @@ "to": "colorize_2", "to_port": 0 }, - { - "from": "colorize_2", - "from_port": 0, - "to": "gen_outputs", - "to_port": 0 - }, { "from": "math_8", "from_port": 0, @@ -207,9 +232,63 @@ "to_port": 1 }, { - "from": "math", + "from": "colorize_2", "from_port": 0, "to": "gen_outputs", + "to_port": 0 + }, + { + "from": "math", + "from_port": 0, + "to": "decompose", + "to_port": 0 + }, + { + "from": "combine", + "from_port": 0, + "to": "gen_outputs", + "to_port": 1 + }, + { + "from": "decompose", + "from_port": 0, + "to": "combine", + "to_port": 0 + }, + { + "from": "decompose", + "from_port": 1, + "to": "combine", + "to_port": 1 + }, + { + "from": "decompose", + "from_port": 2, + "to": "combine", + "to_port": 2 + }, + { + "from": "math", + "from_port": 0, + "to": "math_2", + "to_port": 0 + }, + { + "from": "math_2", + "from_port": 0, + "to": "combine", + "to_port": 3 + }, + { + "from": "fbm2", + "from_port": 0, + "to": "math_9", + "to_port": 0 + }, + { + "from": "math_9", + "from_port": 0, + "to": "math_8", "to_port": 1 } ], @@ -217,8 +296,8 @@ "longdesc": "", "name": "graph", "node_position": { - "x": -1656.337646, - "y": 239.964798 + "x": -1546.436768, + "y": 284.510437 }, "nodes": [ { @@ -459,7 +538,7 @@ "name": "math_7", "node_position": { "x": 242.193024, - "y": -555.033875 + "y": -555.516174 }, "parameters": { "clamp": false, @@ -473,15 +552,15 @@ { "name": "fbm2", "node_position": { - "x": 203.57576, - "y": -335.872437 + "x": -31.397236, + "y": -291.948822 }, "parameters": { "folds": 0, "iterations": 5, "noise": 3, "offset": 0, - "persistence": 0.3, + "persistence": 0.32, "scale_x": 8, "scale_y": 7 }, @@ -492,13 +571,13 @@ "name": "math_8", "node_position": { "x": 497.395172, - "y": -566.178772 + "y": -566.87323 }, "parameters": { - "clamp": false, + "clamp": true, "default_in1": 0, "default_in2": 0, - "op": 2 + "op": 1 }, "seed_int": 0, "type": "math" @@ -522,24 +601,24 @@ }, { "a": 1, - "b": 1, - "g": 1, + "b": 0, + "g": 0, "pos": 0.000001, - "r": 1 + "r": 0 }, { "a": 1, - "b": 0.17453, - "g": 0.519531, + "b": 0.080719, + "g": 0.134069, "pos": 0.028095, - "r": 0.201483 + "r": 0.179688 }, { "a": 1, - "b": 0.109985, - "g": 0.207031, - "pos": 0.821499, - "r": 0.163057 + "b": 0.284546, + "g": 0.392838, + "pos": 0.683393, + "r": 0.433594 } ], "type": "Gradient" @@ -566,8 +645,8 @@ { "name": "gen_outputs", "node_position": { - "x": 1041.897461, - "y": -436.653137 + "x": 1603.897461, + "y": -573.653137 }, "parameters": { @@ -603,8 +682,8 @@ { "name": "math", "node_position": { - "x": 721.161072, - "y": -414.326324 + "x": 769.161072, + "y": -479.326324 }, "parameters": { "clamp": true, @@ -614,6 +693,60 @@ }, "seed_int": 0, "type": "math" + }, + { + "name": "decompose", + "node_position": { + "x": 1070.507202, + "y": -476.516388 + }, + "parameters": { + + }, + "seed_int": 0, + "type": "decompose" + }, + { + "name": "combine", + "node_position": { + "x": 1412.107178, + "y": -478.596375 + }, + "parameters": { + + }, + "seed_int": 0, + "type": "combine" + }, + { + "name": "math_2", + "node_position": { + "x": 1024.507202, + "y": -332.516388 + }, + "parameters": { + "clamp": false, + "default_in1": 0, + "default_in2": 1, + "op": 15 + }, + "seed_int": 0, + "type": "math" + }, + { + "name": "math_9", + "node_position": { + "x": 249.777237, + "y": -324.944916 + }, + "parameters": { + "clamp": false, + "default_in1": 0, + "default_in2": 0.3, + "op": 2 + }, + "seed_int": 0, + "type": "math" } ], "parameters": { @@ -623,43 +756,12 @@ "shortdesc": "", "type": "graph" }, - { - "name": "colorize", - "node_position": { - "x": -423.768982, - "y": -8.696673 - }, - "parameters": { - "gradient": { - "interpolation": 1, - "points": [ - { - "a": 1, - "b": 0, - "g": 0, - "pos": 0, - "r": 0 - }, - { - "a": 1, - "b": 0.040283, - "g": 0.108828, - "pos": 0.648929, - "r": 0.128906 - } - ], - "type": "Gradient" - } - }, - "seed_int": 0, - "type": "colorize" - }, { "generic_size": 1, "name": "blend2_2", "node_position": { - "x": -232.763931, - "y": 222.17923 + "x": -489.832764, + "y": 229.591202 }, "parameters": { "amount1": 1, @@ -671,11 +773,11 @@ { "name": "splatter_color_2", "node_position": { - "x": -1449.887329, - "y": 262.733795 + "x": -1339.98645, + "y": 306.279388 }, "parameters": { - "count": 51, + "count": 100, "opacity": 0, "rotate": 180, "scale": 0, @@ -684,14 +786,15 @@ "select_inputs": 0, "variations": false }, - "seed_int": 0, + "seed_int": 1416378624, + "seed_locked": true, "type": "splatter_color" }, { "name": "buffer_2", "node_position": { - "x": -1153.669678, - "y": 269.545532 + "x": -1043.768799, + "y": 313.091156 }, "parameters": { "size": 11 @@ -703,11 +806,11 @@ { "name": "shape_2", "node_position": { - "x": -1695.679688, - "y": 364.80014 + "x": -1585.778931, + "y": 408.345734 }, "parameters": { - "edge": 0.2, + "edge": 0, "radius": 0.906667, "shape": 0, "sides": 2 @@ -716,21 +819,121 @@ "type": "shape" }, { - "name": "scratches", + "name": "colorize", "node_position": { - "x": -697.072693, - "y": -39.653183 + "x": -747.389404, + "y": 224.760132 }, "parameters": { - "angle": 90, - "layers": 12, - "length": 1, - "randomness": 0, - "waviness": 0.51, - "width": 1 + "gradient": { + "interpolation": 1, + "points": [ + { + "a": 1, + "b": 0.031738, + "g": 0.104694, + "pos": 0, + "r": 0.15625 + }, + { + "a": 1, + "b": 0.038681, + "g": 0.114346, + "pos": 1, + "r": 0.253906 + } + ], + "type": "Gradient" + } }, - "seed_int": 1348632320, - "type": "scratches" + "seed_int": 0, + "type": "colorize" + }, + { + "name": "fbm2", + "node_position": { + "x": -1060.343384, + "y": 59.759666 + }, + "parameters": { + "folds": 0, + "iterations": 5, + "noise": 0, + "offset": 0, + "persistence": 0.5, + "scale_x": 10, + "scale_y": 10 + }, + "seed_int": 1560802304, + "type": "fbm2" + }, + { + "name": "splatter_color_3", + "node_position": { + "x": -1343.273438, + "y": 560.172607 + }, + "parameters": { + "count": 100, + "opacity": 0, + "rotate": 180, + "scale": 0, + "scale_x": 0.05, + "scale_y": 0.05, + "select_inputs": 0, + "variations": false + }, + "seed_int": 1416378624, + "seed_locked": true, + "type": "splatter_color" + }, + { + "name": "splatter_color_4", + "node_position": { + "x": -786.262329, + "y": 577.464539 + }, + "parameters": { + "count": 153, + "opacity": 0, + "rotate": 33.6, + "scale": 0, + "scale_x": 0.5, + "scale_y": 0.5, + "select_inputs": 0, + "variations": false + }, + "seed_int": 1176364672, + "seed_locked": true, + "type": "splatter_color" + }, + { + "name": "buffer_3", + "node_position": { + "x": -1041.671997, + "y": 569.661011 + }, + "parameters": { + "size": 11 + }, + "seed_int": 0, + "type": "buffer", + "version": 1 + }, + { + "name": "normal_map2", + "node_position": { + "x": -492.839508, + "y": 579.223999 + }, + "parameters": { + "buffer": 1, + "param2": 0, + "size": 11, + "strength": 0.04 + }, + "seed_int": 0, + "type": "normal_map2" } ], "parameters": { diff --git a/modules/going/player_body.cpp b/modules/going/player_body.cpp index 6297820e..f6cb23ad 100644 --- a/modules/going/player_body.cpp +++ b/modules/going/player_body.cpp @@ -25,6 +25,7 @@ void PlayerBody::_bind_methods() { BIND_PROPERTY(Variant::FLOAT, target_speed); BIND_PROPERTY(Variant::FLOAT, split_step_time); BIND_PROPERTY(Variant::FLOAT, split_step_stop_time); + BIND_PROPERTY(Variant::VECTOR2, jump_impulse); BIND_PROPERTY(Variant::FLOAT, model_lean); BIND_PROPERTY(Variant::FLOAT, model_lean_speed); } @@ -165,6 +166,14 @@ double PlayerBody::get_split_step_stop_time() const { return this->split_step_stop_time; } +void PlayerBody::set_jump_impulse(Vector2 value) { + this->jump_impulse = value; +} + +Vector2 PlayerBody::get_jump_impulse() const { + return this->jump_impulse; +} + void PlayerBody::set_model_lean(float value) { this->model_lean = value; } diff --git a/modules/going/player_body.h b/modules/going/player_body.h index 0567bbe3..b1867c9c 100644 --- a/modules/going/player_body.h +++ b/modules/going/player_body.h @@ -38,6 +38,8 @@ public: double get_split_step_time() const; void set_split_step_stop_time(double value); double get_split_step_stop_time() const; + void set_jump_impulse(Vector2 value); + Vector2 get_jump_impulse() const; void set_model_lean(float value); float get_model_lean() const; void set_model_lean_speed(float value); @@ -57,6 +59,7 @@ private: float target_speed{30.f}; double split_step_time{0.5}; double split_step_stop_time{0.5}; + Vector2 jump_impulse{5.f, 5.f}; float max_speed_fov{100.f}; float min_fov{80.f}; double max_delta_fov{100.f}; diff --git a/modules/going/player_body.linuxbsd.editor.dev.x86_64.llvm.o b/modules/going/player_body.linuxbsd.editor.dev.x86_64.llvm.o deleted file mode 100644 index 68def84c..00000000 Binary files a/modules/going/player_body.linuxbsd.editor.dev.x86_64.llvm.o and /dev/null differ diff --git a/modules/going/player_states.cpp b/modules/going/player_states.cpp index c693eb77..49d3422b 100644 --- a/modules/going/player_states.cpp +++ b/modules/going/player_states.cpp @@ -71,7 +71,7 @@ void RunningState::physics_process(double delta) { : float(this->get_body()->get_acceleration() * delta) // in-motion velocity ) }; - this->get_body()->set_velocity(current.move_toward(desired, speed_delta)); + this->get_body()->set_velocity(current.move_toward(desired, speed_delta) + Vector3{0.f, -0.01f, 0.f}); } void RunningState::state_exited() { @@ -82,10 +82,12 @@ void RunningState::state_exited() { PlayerState::StateID SplitStepState::get_next_state() const { if(!this->get_body()->is_on_floor()) { return FallingState::get_class_static(); + } else if(this->timer <= 0.0 && Input::get_singleton()->is_action_pressed("jump")) { + return JumpingState::get_class_static(); + } else if(this->timer <= 0.0) { + return RunningState::get_class_static(); } else { - return this->timer <= 0.0 - ? RunningState::get_class_static() - : self_type::get_class_static(); + return self_type::get_class_static(); } } @@ -131,6 +133,31 @@ void FallingState::process(double delta) { this->get_body()->set_velocity((flattened - (flattened * 0.025f)) + Vector3{0.f, current.y - float(9.8 * delta), 0.f}); } +PlayerState::StateID JumpingState::get_next_state() const { + if(this->get_body()->get_velocity().y <= 0.f) { + return FallingState::get_class_static(); + } else { + return self_type::get_class_static(); + } +} + +void JumpingState::state_entered() { + Vector3 const current{this->get_body()->get_velocity()}; + Vector2 const impulse{this->get_body()->get_jump_impulse()}; + float const force{(Vector2{current.x, current.z}.length() / this->get_body()->get_target_speed())}; + this->get_body()->set_velocity( ( + Vector3{current.x, impulse.y, current.z} + + current.normalized() * impulse.x + ) * force); + this->get_body()->get_anim()->play("jump"); +} + +void JumpingState::process(double delta) { + Vector3 const current{this->get_body()->get_velocity()}; + Vector3 const flattened{current.x, 0.f, current.z}; + this->get_body()->set_velocity((flattened - (flattened * 0.025f)) + Vector3{0.f, current.y - float(9.8 * delta), 0.f}); +} + void PlayerStateMachine::_bind_methods() { } @@ -162,6 +189,7 @@ void PlayerStateMachine::ready() { this->add_state(); this->add_state(); this->add_state(); + this->add_state(); } void PlayerStateMachine::try_transition() { diff --git a/modules/going/player_states.h b/modules/going/player_states.h index a7338afa..786c6a64 100644 --- a/modules/going/player_states.h +++ b/modules/going/player_states.h @@ -65,6 +65,14 @@ public: virtual void process(double delta) override; }; +class JumpingState : public PlayerState { + GDCLASS(JumpingState, PlayerState); +public: + virtual StateID get_next_state() const override; + virtual void state_entered() override; + virtual void process(double delta) override; +}; + class PlayerStateMachine : public Node { GDCLASS(PlayerStateMachine, Node); static void _bind_methods(); diff --git a/modules/going/register_types.cpp b/modules/going/register_types.cpp index c8de7259..930c5d1d 100644 --- a/modules/going/register_types.cpp +++ b/modules/going/register_types.cpp @@ -13,6 +13,8 @@ void initialize_going_module(ModuleInitializationLevel p_level) { ClassDB::register_class(); ClassDB::register_class(); ClassDB::register_class(); + ClassDB::register_class(); + ClassDB::register_class(); ClassDB::register_class(); } diff --git a/project/materials/forest_background.tres b/project/materials/forest_background.tres index bbc6b8c9..4ba6bb99 100644 --- a/project/materials/forest_background.tres +++ b/project/materials/forest_background.tres @@ -1,10 +1,14 @@ -[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://djdxb1ptl4fkm"] - -[ext_resource type="Texture2D" uid="uid://b2jg52p2jp4m6" path="res://materials/forest_background_albedo.png" id="1"] - +[gd_resource type="StandardMaterial3D" load_steps=5 format=2] +[ext_resource path="forest_background_albedo.png" type="Texture" id=1] +[ext_resource path="forest_background_normal.png" type="Texture" id=3] [resource] -shading_mode = 0 -diffuse_mode = 3 -specular_mode = 2 -albedo_color = Color(0.262932, 0.262932, 0.262932, 1) -albedo_texture = ExtResource("1") +albedo_color = Color(1, 1, 1, 1) +albedo_texture = ExtResource( 1 ) +metallic = 0.5 +roughness = 1 +normal_enabled = true +normal_scale = 1 +normal_texture = ExtResource( 3 ) + + + diff --git a/project/materials/forest_background_albedo.png b/project/materials/forest_background_albedo.png index 4d9d2e77..391b5e01 100644 Binary files a/project/materials/forest_background_albedo.png and b/project/materials/forest_background_albedo.png differ diff --git a/project/materials/forest_background_normal.png b/project/materials/forest_background_normal.png new file mode 100644 index 00000000..c41d2e53 Binary files /dev/null and b/project/materials/forest_background_normal.png differ diff --git a/project/materials/forest_background_normal.png.import b/project/materials/forest_background_normal.png.import new file mode 100644 index 00000000..d21074c4 --- /dev/null +++ b/project/materials/forest_background_normal.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://boxhd026e1ohc" +path="res://.godot/imported/forest_background_normal.png-cc0828bc4cebd94b47dfb57e8f90a93e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://materials/forest_background_normal.png" +dest_files=["res://.godot/imported/forest_background_normal.png-cc0828bc4cebd94b47dfb57e8f90a93e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/project/models/player/character.blend b/project/models/player/character.blend index e23c4bac..56943d7f 100644 Binary files a/project/models/player/character.blend and b/project/models/player/character.blend differ diff --git a/project/models/player/character.blend1 b/project/models/player/character.blend1 index 93566274..6c595c55 100644 Binary files a/project/models/player/character.blend1 and b/project/models/player/character.blend1 differ diff --git a/project/models/terrains/level.blend b/project/models/terrains/level.blend new file mode 100644 index 00000000..b66076fd Binary files /dev/null and b/project/models/terrains/level.blend differ diff --git a/project/models/terrains/level.blend.import b/project/models/terrains/level.blend.import new file mode 100644 index 00000000..c2cfce03 --- /dev/null +++ b/project/models/terrains/level.blend.import @@ -0,0 +1,60 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://5cfl3xu1861l" +path="res://.godot/imported/level.blend-7249bfeba9b08006b88dc69b8212480c.scn" + +[deps] + +source_file="res://models/terrains/level.blend" +dest_files=["res://.godot/imported/level.blend-7249bfeba9b08006b88dc69b8212480c.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +nodes/use_node_type_suffixes=true +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={ +"materials": { +"Terrain": { +"use_external/enabled": true, +"use_external/path": "uid://5knww03rsy1a" +} +} +} +blender/nodes/visible=0 +blender/nodes/active_collection_only=false +blender/nodes/punctual_lights=true +blender/nodes/cameras=true +blender/nodes/custom_properties=true +blender/nodes/modifiers=1 +blender/meshes/colors=false +blender/meshes/uvs=true +blender/meshes/normals=true +blender/meshes/export_geometry_nodes_instances=false +blender/meshes/tangents=true +blender/meshes/skins=2 +blender/meshes/export_bones_deforming_mesh_only=false +blender/materials/unpack_enabled=true +blender/materials/export_materials=1 +blender/animation/limit_playback=true +blender/animation/always_sample=true +blender/animation/group_tracks=true diff --git a/project/models/terrains/level.blend1 b/project/models/terrains/level.blend1 new file mode 100644 index 00000000..634adf43 Binary files /dev/null and b/project/models/terrains/level.blend1 differ diff --git a/project/objects/player.tscn b/project/objects/player.tscn index f1609b34..de52095d 100644 --- a/project/objects/player.tscn +++ b/project/objects/player.tscn @@ -22,8 +22,9 @@ func _process(_delta): " [node name="Player" type="PlayerBody"] -wall_min_slide_angle = 0.0 -floor_max_angle = 0.523599 +wall_min_slide_angle = 0.785398 +floor_max_angle = 0.968658 +floor_snap_length = 1.5 [node name="PlayerStateMachine" type="PlayerStateMachine" parent="."] diff --git a/project/project.godot b/project/project.godot index 1a2d634b..4752121f 100644 --- a/project/project.godot +++ b/project/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="going" -run/main_scene="uid://bp0vgy3lnsucd" +run/main_scene="uid://sofv1apr4467" config/features=PackedStringArray("4.4", "Forward Plus") config/icon="res://icon.svg" @@ -42,6 +42,11 @@ split_step={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) ] } +jump={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null) +] +} [layer_names] diff --git a/project/scenes/test_level.tscn b/project/scenes/test_level.tscn index a43fb537..36bbc7c7 100644 --- a/project/scenes/test_level.tscn +++ b/project/scenes/test_level.tscn @@ -79,8 +79,8 @@ transform = Transform3D(0.994166, 0, 0.107861, 0, 1, 0, -0.107861, 0, 0.994166, size = Vector3(33.525, 13.992, 23.5235) [node name="CSGBox3D4" type="CSGBox3D" parent="CSGCombiner3D"] -transform = Transform3D(-0.994886, 0, -0.101005, 0, 1, 0, 0.101005, 0, -0.994886, -74.3581, 7.17883, -23.1177) -size = Vector3(21.0713, 13.992, 29.5631) +transform = Transform3D(-0.994886, 0, -0.101005, 0, 1, 0, 0.101005, 0, -0.994886, -74.3581, 1.78923, -23.1177) +size = Vector3(21.0713, 3.2128, 29.5631) [node name="CSGBox3D17" type="CSGBox3D" parent="CSGCombiner3D"] transform = Transform3D(0.0501054, 0, -0.998744, 0, 1, 0, 0.998744, 0, 0.0501054, -31.5186, 7.17883, -17.6439) @@ -193,6 +193,66 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -74.085, 0.5, -77.013) [node name="tree2" parent="." instance=ExtResource("3_j6w7d")] transform = Transform3D(-0.799391, 0, 0.600811, 0, 1, 0, -0.600811, 0, -0.799391, -87.2561, 0.446493, -28.6384) +[node name="tree8" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.799391, 0, 0.600811, 0, 1, 0, -0.600811, 0, -0.799391, -87.1315, 0.446493, -21.9106) + +[node name="tree9" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.799391, 0, 0.600811, 0, 1, 0, -0.600811, 0, -0.799391, -86.5709, 0.446493, -14.8713) + +[node name="tree10" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.965309, 1.62273e-08, 0.261111, 1.48488e-08, 1, -7.25249e-09, -0.261111, -3.12372e-09, -0.965309, -85.1381, 0.446493, -8.01887) + +[node name="tree11" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.475716, 4.32288e-08, -0.879599, 6.47108e-08, 1, 1.41483e-08, 0.879599, -5.01889e-08, -0.475716, -80.2791, 0.446493, -6.71068) + +[node name="tree12" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.232156, 4.00848e-08, -0.972679, 6.87794e-08, 1, 2.47947e-08, 0.972679, -6.11441e-08, -0.232156, -73.3021, 0.446493, -7.33363) + +[node name="tree13" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.232156, 4.00848e-08, -0.972679, 6.87794e-08, 1, 2.47947e-08, 0.972679, -6.11441e-08, -0.232156, -66.512, 0.446493, -8.08116) + +[node name="tree14" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.462043, 1.88547e-08, -0.886858, 6.50281e-08, 1, 5.5139e-08, 0.886858, -8.31472e-08, 0.462043, -60.4071, 0.446493, -9.38935) + +[node name="tree15" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.971301, -3.38198e-08, 0.237855, 1.58653e-08, 1, 7.73994e-08, -0.237855, -7.14045e-08, 0.971301, -60.7186, 0.446493, -14.6844) + +[node name="tree16" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -61.7186, 0.446493, -23.6844) + +[node name="tree17" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -62.2169, 0.446493, -31.1598) + +[node name="tree19" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -68.878, 3.29781, -34.0065) + +[node name="tree20" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -67.027, 3.29781, -23.6742) + +[node name="tree21" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.483466, 1.78905e-08, -0.875364, 6.45256e-08, 1, 5.60754e-08, 0.875364, -8.35939e-08, 0.483466, -65.6471, 3.29781, -14.7554) + +[node name="tree22" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.0191803, 3.54398e-08, -0.999816, 6.99656e-08, 1, 3.41041e-08, 0.999816, -6.92986e-08, -0.0191803, -74.1284, 3.29781, -12.5341) + +[node name="tree23" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.839155, 4.10431e-08, -0.543892, 5.00365e-08, 1, -1.73813e-09, 0.543892, -2.8673e-08, -0.839155, -82.307, 3.29781, -12.8036) + +[node name="tree24" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.982584, 3.22979e-08, -0.185821, 3.43847e-08, 1, -8.00759e-09, 0.185821, -1.42575e-08, -0.982584, -83.0474, 3.29781, -21.0492) + +[node name="tree25" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(-0.968449, 1.67255e-08, 0.249214, 1.53688e-08, 1, -7.38972e-09, -0.249214, -3.32642e-09, -0.968449, -83.6196, 3.29781, -29.968) + +[node name="tree26" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.293357, -4.11094e-08, 0.956003, -1.5526e-08, 1, 4.77655e-08, -0.956003, -2.88552e-08, 0.293357, -83.7206, 3.29781, -35.9251) + +[node name="tree27" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.293357, -4.11094e-08, 0.956003, -1.5526e-08, 1, 4.77655e-08, -0.956003, -2.88552e-08, 0.293357, -74.4315, 3.29781, -34.9491) + +[node name="tree18" parent="." instance=ExtResource("3_j6w7d")] +transform = Transform3D(0.975558, -1.7942e-08, -0.219744, 3.58676e-08, 1, 7.75855e-08, 0.219744, -8.35708e-08, 0.975558, -63.0268, 0.446493, -37.763) + [node name="tree3" parent="." instance=ExtResource("3_j6w7d")] transform = Transform3D(-0.645085, 0, 0.764112, 0, 1, 0, -0.764112, 0, -0.645085, -87.8342, 0.446493, -33.7517) diff --git a/project/scenes/valley.tscn b/project/scenes/valley.tscn new file mode 100644 index 00000000..b2f3ff0a --- /dev/null +++ b/project/scenes/valley.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://sofv1apr4467"] + +[ext_resource type="PackedScene" uid="uid://5cfl3xu1861l" path="res://models/terrains/level.blend" id="1_ch7jd"] +[ext_resource type="PackedScene" uid="uid://dcgsrdacswacl" path="res://objects/player.tscn" id="2_pvuhy"] + +[node name="Valley" type="Node3D"] + +[node name="level" parent="." instance=ExtResource("1_ch7jd")] + +[node name="Player" parent="." instance=ExtResource("2_pvuhy")] +transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 523.554, 26.0153, -0.09375) + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(1, 0, 0, 0, -0.740828, 0.671695, 0, -0.671695, -0.740828, 0, 6.05439, 0) +shadow_enabled = true +shadow_normal_bias = 9.168 +shadow_reverse_cull_face = true +shadow_blur = 0.973 +directional_shadow_split_1 = 0.009 +directional_shadow_split_2 = 0.173 +directional_shadow_split_3 = 0.73 +directional_shadow_fade_start = 0.712 +directional_shadow_max_distance = 1010.0 +directional_shadow_pancake_size = 1.7