diff --git a/3D Models/Character3D/Character3D.blend.import b/3D Models/Character3D/Character3D.blend.import new file mode 100644 index 0000000..c155bcc --- /dev/null +++ b/3D Models/Character3D/Character3D.blend.import @@ -0,0 +1,51 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://bjke3oesim1n8" +path="res://.godot/imported/Character3D.blend-6170a3a179a200ce20c05d128bbcdb13.scn" + +[deps] + +source_file="res://3D Models/Character3D/Character3D.blend" +dest_files=["res://.godot/imported/Character3D.blend-6170a3a179a200ce20c05d128bbcdb13.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +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={} +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/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/Scenes and Scripts/global.gd b/Scenes and Scripts/global.gd new file mode 100644 index 0000000..5ecded8 --- /dev/null +++ b/Scenes and Scripts/global.gd @@ -0,0 +1,12 @@ +extends Node + +var falling = false + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/Scenes and Scripts/gravity_dropable.gd b/Scenes and Scripts/gravity_dropable.gd new file mode 100644 index 0000000..462afb7 --- /dev/null +++ b/Scenes and Scripts/gravity_dropable.gd @@ -0,0 +1,23 @@ +extends CharacterBody3D + + + + + +func _physics_process(delta: float) -> void: + # Add the gravity. + if not is_on_floor() and Global.falling == false: + velocity += get_gravity() * delta + + move_and_slide() + + +func _on_pressure_plate_body_entered(body: Node3D) -> void: + if body.is_in_group("Player"): + + Global.falling = true + self.position.y = 4.431 + + +func _on_pressure_plate_body_exited(body: Node3D) -> void: + Global.falling = false diff --git a/Scenes and Scripts/worB80F.tmp b/Scenes and Scripts/worB80F.tmp new file mode 100644 index 0000000..993674a --- /dev/null +++ b/Scenes and Scripts/worB80F.tmp @@ -0,0 +1,109 @@ +[gd_scene load_steps=16 format=3 uid="uid://dhtjxwey6f5ld"] + +[ext_resource type="PackedScene" uid="uid://bsljbif1rji7e" path="res://Scenes and Scripts/Player/3DPlayer.tscn" id="1_6l6pc"] +[ext_resource type="Script" path="res://Scenes and Scripts/world.gd" id="1_35i28"] +[ext_resource type="PackedScene" uid="uid://c5paftmrnwj3c" path="res://3D Models/HowToPlay.blend" id="3_plmd8"] +[ext_resource type="Script" path="res://Scenes and Scripts/gravity_dropable.gd" id="4_xv00g"] + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_gdkvv"] +sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1) +ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1) + +[sub_resource type="Sky" id="Sky_joqt5"] +sky_material = SubResource("ProceduralSkyMaterial_gdkvv") + +[sub_resource type="Environment" id="Environment_wsre4"] +background_mode = 2 +sky = SubResource("Sky_joqt5") +tonemap_mode = 2 +glow_enabled = true + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xw0we"] +albedo_color = Color(0.15, 0.15, 0.15, 1) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_litvj"] + +[sub_resource type="TextMesh" id="TextMesh_r52l0"] +material = SubResource("StandardMaterial3D_litvj") +text = "Press the spacebar, watch the player fall +back to the ground. Now, move the player +to the red platform on the ground +and step on it. The grey cube will fall and +respawn after 2 seconds." + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xlx5t"] +albedo_color = Color(1, 0, 0, 1) + +[sub_resource type="BoxMesh" id="BoxMesh_0q238"] +material = SubResource("StandardMaterial3D_xlx5t") + +[sub_resource type="BoxShape3D" id="BoxShape3D_hfvd5"] + +[sub_resource type="BoxMesh" id="BoxMesh_dgwl6"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_f7jgy"] + +[node name="World" type="Node3D"] +script = ExtResource("1_35i28") + +[node name="Environment" type="Node" parent="."] + +[node name="WorldEnvironment" type="WorldEnvironment" parent="Environment"] +environment = SubResource("Environment_wsre4") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Environment"] +transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0) +shadow_enabled = true + +[node name="3DPlayer" parent="." groups=["Player"] instance=ExtResource("1_6l6pc")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.166136, 0.141595, -2) +crosshair_size = Vector2(3, 3) + +[node name="Objects" type="Node" parent="."] + +[node name="Ground" type="CSGBox3D" parent="Objects"] +transform = Transform3D(1.59899, 0, 0, 0, 1.59899, 0, 0, 0, 1.59899, 0.538818, -0.77202, -0.306824) +material_override = SubResource("StandardMaterial3D_xw0we") +use_collision = true +size = Vector3(9.85791, 1, 16.7933) + +[node name="TV" type="CSGBox3D" parent="Objects"] +transform = Transform3D(-2.20134e-08, 0, -0.920567, 0, 1.59899, 0, 0.503609, 0, -4.02393e-08, 0.68866, 2.85577, -14.729) +material_override = SubResource("StandardMaterial3D_xw0we") +use_collision = true +size = Vector3(9.85791, 5.48779, 16.7933) + +[node name="TV2" type="CSGBox3D" parent="Objects"] +transform = Transform3D(-2.20134e-08, 0, -0.920567, 0, 1.59899, 0, 0.503609, 0, -4.02393e-08, 0.68866, 2.85577, 13.635) +material_override = SubResource("StandardMaterial3D_xw0we") +use_collision = true +size = Vector3(9.85791, 5.48779, 16.7933) + +[node name="HowToPlay" parent="." instance=ExtResource("3_plmd8")] +transform = Transform3D(-1.18338, 0, -1.03454e-07, 1.03454e-07, -5.17271e-08, -1.18338, -4.52213e-15, -1.18338, 5.17271e-08, 3.45169, 3.61752, 11.0703) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +transform = Transform3D(4.393, 0, 0, 0, 4.393, 0, 0, 0, 13.9338, 0.93899, 3.51942, -12.5134) +mesh = SubResource("TextMesh_r52l0") + +[node name="PressurePlate" type="Area3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.79608, -0.386657, -6.2621) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="PressurePlate"] +mesh = SubResource("BoxMesh_0q238") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="PressurePlate"] +shape = SubResource("BoxShape3D_hfvd5") + +[node name="GravityDropable" type="CharacterBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.4309, -8.70151) +script = ExtResource("4_xv00g") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="GravityDropable"] +mesh = SubResource("BoxMesh_dgwl6") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="GravityDropable"] +shape = SubResource("BoxShape3D_f7jgy") + +[connection signal="body_entered" from="PressurePlate" to="." method="_on_pressure_plate_body_entered"] +[connection signal="body_exited" from="PressurePlate" to="." method="_on_pressure_plate_body_exited"] diff --git a/Scenes and Scripts/worCCFF.tmp b/Scenes and Scripts/worCCFF.tmp new file mode 100644 index 0000000..993674a --- /dev/null +++ b/Scenes and Scripts/worCCFF.tmp @@ -0,0 +1,109 @@ +[gd_scene load_steps=16 format=3 uid="uid://dhtjxwey6f5ld"] + +[ext_resource type="PackedScene" uid="uid://bsljbif1rji7e" path="res://Scenes and Scripts/Player/3DPlayer.tscn" id="1_6l6pc"] +[ext_resource type="Script" path="res://Scenes and Scripts/world.gd" id="1_35i28"] +[ext_resource type="PackedScene" uid="uid://c5paftmrnwj3c" path="res://3D Models/HowToPlay.blend" id="3_plmd8"] +[ext_resource type="Script" path="res://Scenes and Scripts/gravity_dropable.gd" id="4_xv00g"] + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_gdkvv"] +sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1) +ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1) + +[sub_resource type="Sky" id="Sky_joqt5"] +sky_material = SubResource("ProceduralSkyMaterial_gdkvv") + +[sub_resource type="Environment" id="Environment_wsre4"] +background_mode = 2 +sky = SubResource("Sky_joqt5") +tonemap_mode = 2 +glow_enabled = true + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xw0we"] +albedo_color = Color(0.15, 0.15, 0.15, 1) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_litvj"] + +[sub_resource type="TextMesh" id="TextMesh_r52l0"] +material = SubResource("StandardMaterial3D_litvj") +text = "Press the spacebar, watch the player fall +back to the ground. Now, move the player +to the red platform on the ground +and step on it. The grey cube will fall and +respawn after 2 seconds." + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xlx5t"] +albedo_color = Color(1, 0, 0, 1) + +[sub_resource type="BoxMesh" id="BoxMesh_0q238"] +material = SubResource("StandardMaterial3D_xlx5t") + +[sub_resource type="BoxShape3D" id="BoxShape3D_hfvd5"] + +[sub_resource type="BoxMesh" id="BoxMesh_dgwl6"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_f7jgy"] + +[node name="World" type="Node3D"] +script = ExtResource("1_35i28") + +[node name="Environment" type="Node" parent="."] + +[node name="WorldEnvironment" type="WorldEnvironment" parent="Environment"] +environment = SubResource("Environment_wsre4") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Environment"] +transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0) +shadow_enabled = true + +[node name="3DPlayer" parent="." groups=["Player"] instance=ExtResource("1_6l6pc")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.166136, 0.141595, -2) +crosshair_size = Vector2(3, 3) + +[node name="Objects" type="Node" parent="."] + +[node name="Ground" type="CSGBox3D" parent="Objects"] +transform = Transform3D(1.59899, 0, 0, 0, 1.59899, 0, 0, 0, 1.59899, 0.538818, -0.77202, -0.306824) +material_override = SubResource("StandardMaterial3D_xw0we") +use_collision = true +size = Vector3(9.85791, 1, 16.7933) + +[node name="TV" type="CSGBox3D" parent="Objects"] +transform = Transform3D(-2.20134e-08, 0, -0.920567, 0, 1.59899, 0, 0.503609, 0, -4.02393e-08, 0.68866, 2.85577, -14.729) +material_override = SubResource("StandardMaterial3D_xw0we") +use_collision = true +size = Vector3(9.85791, 5.48779, 16.7933) + +[node name="TV2" type="CSGBox3D" parent="Objects"] +transform = Transform3D(-2.20134e-08, 0, -0.920567, 0, 1.59899, 0, 0.503609, 0, -4.02393e-08, 0.68866, 2.85577, 13.635) +material_override = SubResource("StandardMaterial3D_xw0we") +use_collision = true +size = Vector3(9.85791, 5.48779, 16.7933) + +[node name="HowToPlay" parent="." instance=ExtResource("3_plmd8")] +transform = Transform3D(-1.18338, 0, -1.03454e-07, 1.03454e-07, -5.17271e-08, -1.18338, -4.52213e-15, -1.18338, 5.17271e-08, 3.45169, 3.61752, 11.0703) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +transform = Transform3D(4.393, 0, 0, 0, 4.393, 0, 0, 0, 13.9338, 0.93899, 3.51942, -12.5134) +mesh = SubResource("TextMesh_r52l0") + +[node name="PressurePlate" type="Area3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.79608, -0.386657, -6.2621) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="PressurePlate"] +mesh = SubResource("BoxMesh_0q238") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="PressurePlate"] +shape = SubResource("BoxShape3D_hfvd5") + +[node name="GravityDropable" type="CharacterBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.4309, -8.70151) +script = ExtResource("4_xv00g") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="GravityDropable"] +mesh = SubResource("BoxMesh_dgwl6") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="GravityDropable"] +shape = SubResource("BoxShape3D_f7jgy") + +[connection signal="body_entered" from="PressurePlate" to="." method="_on_pressure_plate_body_entered"] +[connection signal="body_exited" from="PressurePlate" to="." method="_on_pressure_plate_body_exited"] diff --git a/Scenes and Scripts/worDA76.tmp b/Scenes and Scripts/worDA76.tmp new file mode 100644 index 0000000..993674a --- /dev/null +++ b/Scenes and Scripts/worDA76.tmp @@ -0,0 +1,109 @@ +[gd_scene load_steps=16 format=3 uid="uid://dhtjxwey6f5ld"] + +[ext_resource type="PackedScene" uid="uid://bsljbif1rji7e" path="res://Scenes and Scripts/Player/3DPlayer.tscn" id="1_6l6pc"] +[ext_resource type="Script" path="res://Scenes and Scripts/world.gd" id="1_35i28"] +[ext_resource type="PackedScene" uid="uid://c5paftmrnwj3c" path="res://3D Models/HowToPlay.blend" id="3_plmd8"] +[ext_resource type="Script" path="res://Scenes and Scripts/gravity_dropable.gd" id="4_xv00g"] + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_gdkvv"] +sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1) +ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1) + +[sub_resource type="Sky" id="Sky_joqt5"] +sky_material = SubResource("ProceduralSkyMaterial_gdkvv") + +[sub_resource type="Environment" id="Environment_wsre4"] +background_mode = 2 +sky = SubResource("Sky_joqt5") +tonemap_mode = 2 +glow_enabled = true + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xw0we"] +albedo_color = Color(0.15, 0.15, 0.15, 1) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_litvj"] + +[sub_resource type="TextMesh" id="TextMesh_r52l0"] +material = SubResource("StandardMaterial3D_litvj") +text = "Press the spacebar, watch the player fall +back to the ground. Now, move the player +to the red platform on the ground +and step on it. The grey cube will fall and +respawn after 2 seconds." + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xlx5t"] +albedo_color = Color(1, 0, 0, 1) + +[sub_resource type="BoxMesh" id="BoxMesh_0q238"] +material = SubResource("StandardMaterial3D_xlx5t") + +[sub_resource type="BoxShape3D" id="BoxShape3D_hfvd5"] + +[sub_resource type="BoxMesh" id="BoxMesh_dgwl6"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_f7jgy"] + +[node name="World" type="Node3D"] +script = ExtResource("1_35i28") + +[node name="Environment" type="Node" parent="."] + +[node name="WorldEnvironment" type="WorldEnvironment" parent="Environment"] +environment = SubResource("Environment_wsre4") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="Environment"] +transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0) +shadow_enabled = true + +[node name="3DPlayer" parent="." groups=["Player"] instance=ExtResource("1_6l6pc")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.166136, 0.141595, -2) +crosshair_size = Vector2(3, 3) + +[node name="Objects" type="Node" parent="."] + +[node name="Ground" type="CSGBox3D" parent="Objects"] +transform = Transform3D(1.59899, 0, 0, 0, 1.59899, 0, 0, 0, 1.59899, 0.538818, -0.77202, -0.306824) +material_override = SubResource("StandardMaterial3D_xw0we") +use_collision = true +size = Vector3(9.85791, 1, 16.7933) + +[node name="TV" type="CSGBox3D" parent="Objects"] +transform = Transform3D(-2.20134e-08, 0, -0.920567, 0, 1.59899, 0, 0.503609, 0, -4.02393e-08, 0.68866, 2.85577, -14.729) +material_override = SubResource("StandardMaterial3D_xw0we") +use_collision = true +size = Vector3(9.85791, 5.48779, 16.7933) + +[node name="TV2" type="CSGBox3D" parent="Objects"] +transform = Transform3D(-2.20134e-08, 0, -0.920567, 0, 1.59899, 0, 0.503609, 0, -4.02393e-08, 0.68866, 2.85577, 13.635) +material_override = SubResource("StandardMaterial3D_xw0we") +use_collision = true +size = Vector3(9.85791, 5.48779, 16.7933) + +[node name="HowToPlay" parent="." instance=ExtResource("3_plmd8")] +transform = Transform3D(-1.18338, 0, -1.03454e-07, 1.03454e-07, -5.17271e-08, -1.18338, -4.52213e-15, -1.18338, 5.17271e-08, 3.45169, 3.61752, 11.0703) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +transform = Transform3D(4.393, 0, 0, 0, 4.393, 0, 0, 0, 13.9338, 0.93899, 3.51942, -12.5134) +mesh = SubResource("TextMesh_r52l0") + +[node name="PressurePlate" type="Area3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.79608, -0.386657, -6.2621) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="PressurePlate"] +mesh = SubResource("BoxMesh_0q238") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="PressurePlate"] +shape = SubResource("BoxShape3D_hfvd5") + +[node name="GravityDropable" type="CharacterBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.4309, -8.70151) +script = ExtResource("4_xv00g") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="GravityDropable"] +mesh = SubResource("BoxMesh_dgwl6") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="GravityDropable"] +shape = SubResource("BoxShape3D_f7jgy") + +[connection signal="body_entered" from="PressurePlate" to="." method="_on_pressure_plate_body_entered"] +[connection signal="body_exited" from="PressurePlate" to="." method="_on_pressure_plate_body_exited"] diff --git a/Scenes and Scripts/world.gd b/Scenes and Scripts/world.gd new file mode 100644 index 0000000..b5a2611 --- /dev/null +++ b/Scenes and Scripts/world.gd @@ -0,0 +1,12 @@ +extends Node3D + + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/Scenes and Scripts/world.tscn b/Scenes and Scripts/world.tscn index 5c6de86..91c1b21 100644 --- a/Scenes and Scripts/world.tscn +++ b/Scenes and Scripts/world.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=12 format=3 uid="uid://dhtjxwey6f5ld"] +[gd_scene load_steps=16 format=3 uid="uid://dhtjxwey6f5ld"] [ext_resource type="PackedScene" uid="uid://bsljbif1rji7e" path="res://Scenes and Scripts/Player/3DPlayer.tscn" id="1_6l6pc"] -[ext_resource type="PackedScene" uid="uid://5rflnwqeisc5" path="res://3D Models/Notice.blend" id="2_voajr"] +[ext_resource type="Script" path="res://Scenes and Scripts/world.gd" id="1_35i28"] [ext_resource type="PackedScene" uid="uid://c5paftmrnwj3c" path="res://3D Models/HowToPlay.blend" id="3_plmd8"] +[ext_resource type="Script" path="res://Scenes and Scripts/gravity_dropable.gd" id="4_xv00g"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_gdkvv"] sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1) @@ -20,17 +21,31 @@ glow_enabled = true [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xw0we"] albedo_color = Color(0.15, 0.15, 0.15, 1) -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dvxuq"] -albedo_color = Color(0, 1, 1, 1) +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_litvj"] -[sub_resource type="PrismMesh" id="PrismMesh_7x1tb"] +[sub_resource type="TextMesh" id="TextMesh_r52l0"] +material = SubResource("StandardMaterial3D_litvj") +text = "Press the spacebar, watch the player fall +back to the ground. Now, move the player +to the red platform on the ground +and step on it. The grey cube will fall and +respawn after you move out of the +red platform and back into it." -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a53q3"] -albedo_color = Color(0, 1, 0, 1) +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_xlx5t"] +albedo_color = Color(1, 0, 0, 1) -[sub_resource type="BoxMesh" id="BoxMesh_culcm"] +[sub_resource type="BoxMesh" id="BoxMesh_0q238"] +material = SubResource("StandardMaterial3D_xlx5t") + +[sub_resource type="BoxShape3D" id="BoxShape3D_hfvd5"] + +[sub_resource type="BoxMesh" id="BoxMesh_dgwl6"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_f7jgy"] [node name="World" type="Node3D"] +script = ExtResource("1_35i28") [node name="Environment" type="Node" parent="."] @@ -41,7 +56,7 @@ environment = SubResource("Environment_wsre4") transform = Transform3D(-0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, 0.75, -0.433013, 0, 0, 0) shadow_enabled = true -[node name="3DPlayer" parent="." instance=ExtResource("1_6l6pc")] +[node name="3DPlayer" parent="." groups=["Player"] instance=ExtResource("1_6l6pc")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.166136, 0.141595, -2) crosshair_size = Vector2(3, 3) @@ -65,37 +80,31 @@ material_override = SubResource("StandardMaterial3D_xw0we") use_collision = true size = Vector3(9.85791, 5.48779, 16.7933) -[node name="CSGBox3D" type="CSGBox3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.144196, -7.40733) -use_collision = true -size = Vector3(1, 1.28839, 1) +[node name="HowToPlay" parent="." instance=ExtResource("3_plmd8")] +transform = Transform3D(-1.18338, 0, -1.03454e-07, 1.03454e-07, -5.17271e-08, -1.18338, -4.52213e-15, -1.18338, 5.17271e-08, 3.45169, 3.61752, 11.0703) -[node name="CSGBox3D2" type="CSGMesh3D" parent="."] -transform = Transform3D(4.00584, 0, 0, 0, 1, 0, 0, 0, 2.10231, -4.1166, 0.144196, -2.43228) -material_override = SubResource("StandardMaterial3D_dvxuq") -use_collision = true -mesh = SubResource("PrismMesh_7x1tb") +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +transform = Transform3D(4.393, 0, 0, 0, 4.393, 0, 0, 0, 13.9338, 0.738868, 3.51942, -12.5134) +mesh = SubResource("TextMesh_r52l0") -[node name="CSGBox3D3" type="CSGMesh3D" parent="."] -transform = Transform3D(1.4724, 0, 0, 0, 2.09496, 0, 0, 0, 1.20878, 4.81607, -0.102195, -0.723562) -material_override = SubResource("StandardMaterial3D_a53q3") -use_collision = true -mesh = SubResource("BoxMesh_culcm") +[node name="PressurePlate" type="Area3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.79608, -0.386657, -6.2621) -[node name="CSGBox3D4" type="CSGMesh3D" parent="."] -transform = Transform3D(1.4724, 0, 0, 0, 2.09496, 0, 0, 0, 1.20878, 4.81607, 0.376765, -1.91849) -material_override = SubResource("StandardMaterial3D_a53q3") -use_collision = true -mesh = SubResource("BoxMesh_culcm") +[node name="MeshInstance3D" type="MeshInstance3D" parent="PressurePlate"] +mesh = SubResource("BoxMesh_0q238") -[node name="CSGBox3D5" type="CSGMesh3D" parent="."] -transform = Transform3D(1.4724, 0, 0, 0, 2.09496, 0, 0, 0, 1.20878, 4.81607, 0.869527, -3.06762) -material_override = SubResource("StandardMaterial3D_a53q3") -use_collision = true -mesh = SubResource("BoxMesh_culcm") +[node name="CollisionShape3D" type="CollisionShape3D" parent="PressurePlate"] +shape = SubResource("BoxShape3D_hfvd5") -[node name="Notice" parent="." instance=ExtResource("2_voajr")] -transform = Transform3D(0.6, 0, 0, 0, -2.62268e-08, -0.6, 0, 0.6, -2.62268e-08, 0.752138, 3.60517, -12.1883) +[node name="GravityDropable" type="CharacterBody3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.4309, -8.70151) +script = ExtResource("4_xv00g") -[node name="HowToPlay" parent="." instance=ExtResource("3_plmd8")] -transform = Transform3D(-1.18338, 0, -1.03454e-07, 1.03454e-07, -5.17271e-08, -1.18338, -4.52213e-15, -1.18338, 5.17271e-08, 3.45169, 3.61752, 11.0703) +[node name="MeshInstance3D" type="MeshInstance3D" parent="GravityDropable"] +mesh = SubResource("BoxMesh_dgwl6") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="GravityDropable"] +shape = SubResource("BoxShape3D_f7jgy") + +[connection signal="body_entered" from="PressurePlate" to="GravityDropable" method="_on_pressure_plate_body_entered"] +[connection signal="body_exited" from="PressurePlate" to="GravityDropable" method="_on_pressure_plate_body_exited"] diff --git a/project.godot b/project.godot index 0add3a3..e717dde 100644 --- a/project.godot +++ b/project.godot @@ -10,10 +10,14 @@ config_version=5 [application] -config/name="Expland Collision Game Asset" +config/name="Expland Gravity Game Asset" config/tags=PackedStringArray("3d", "for_school") run/main_scene="res://Scenes and Scripts/world.tscn" -config/features=PackedStringArray("4.2", "Forward Plus") +config/features=PackedStringArray("4.3", "Forward Plus") + +[autoload] + +Global="*res://Scenes and Scripts/global.gd" [display] @@ -24,46 +28,46 @@ window/stretch/mode="canvas_items" Quit={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":true,"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":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } Reset={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":82,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } Jump={ "deadzone": 0.5, -"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,"echo":false,"script":null) +"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) ] } move_forward={ "deadzone": 0.5, -"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":87,"key_label":0,"unicode":119,"echo":false,"script":null) +"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":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) ] } move_backward={ "deadzone": 0.5, -"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":83,"key_label":0,"unicode":115,"echo":false,"script":null) +"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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) ] } move_left={ "deadzone": 0.5, -"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":65,"key_label":0,"unicode":97,"echo":false,"script":null) +"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":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null) ] } move_right={ "deadzone": 0.5, -"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":68,"key_label":0,"unicode":100,"echo":false,"script":null) +"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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) ] } Sprint={ "deadzone": 0.5, -"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":4194325,"key_label":0,"unicode":0,"echo":false,"script":null) +"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":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] } Crouch={ "deadzone": 0.5, -"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":4194326,"key_label":0,"unicode":0,"echo":false,"script":null) +"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":4194326,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) ] }