From a6dd6b646d0958e680291c1d3cc5a12d87130d50 Mon Sep 17 00:00:00 2001 From: jonathan Date: Sun, 1 Feb 2026 19:34:22 +0100 Subject: [PATCH] Face the hammering --- models/Body_T_Face.png | Bin 573 -> 665 bytes models/Hammer.glb | Bin 0 -> 22884 bytes models/Hammer.glb.import | 42 +++++++++++ models/Hammer_T_Hammer.png | Bin 0 -> 131 bytes models/Hammer_T_Hammer.png.import | 44 ++++++++++++ models/hammer_vis.gd | 16 +++++ models/hammer_vis.gd.uid | 1 + project.godot | 10 +++ scenes/hammering.gd | 26 +++++++ scenes/hammering.gd.uid | 1 + scenes/room.tscn | 115 ++++++++++++++++++++++-------- 11 files changed, 227 insertions(+), 28 deletions(-) create mode 100644 models/Hammer.glb create mode 100644 models/Hammer.glb.import create mode 100644 models/Hammer_T_Hammer.png create mode 100644 models/Hammer_T_Hammer.png.import create mode 100644 models/hammer_vis.gd create mode 100644 models/hammer_vis.gd.uid create mode 100644 scenes/hammering.gd create mode 100644 scenes/hammering.gd.uid diff --git a/models/Body_T_Face.png b/models/Body_T_Face.png index d4454a9f2bd874545737aeeed2c83653365edbba..f86b26b3940e0d43746c7aa2efa0e97a877edd79 100644 GIT binary patch delta 628 zcmdnXGLv(6K^GHFg-)AcYh$9WYyY>!`*-#90xCG4*L`K^Za>+dmr?*G2v z@ZG%&gid^pk^UThjbTQE)1s#wYu!!@mK3l2XSKyL$nrnmfx;;VuNfTKw8nXV)`3Ua za!HZ5UesIdKC<}PlQZ@EC%tdDVm#w;(tm{`=RRg$nEY~!4SOK_`rcL-Q-y6APZ+u- zzXmM{D?9n%t?7##Gj6UPx5bZse%NqkYiAZiOv$@e?-k`U?=O&Uot@W}7NjG7kI5io z*Q85aK5G`$7nO$hykGxuMb({af0iSi8ICjld#QD?s3mMM#A8vuTF?J8$hf~u zvR`-6b$^zF^zWbhzJGsb-C)1?)6A*o^JO>LyIo<(nljOQjkpr~4Xa?=+@(JY^=j&t;ucLK6V0 Cr6HaG delta 536 zc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R+gh?5Ety+1L4uKj(d& z&$+d;zw=lAg7@a75FvrOkn=jrz&VJ7EVvl!53Om5*CAOD% z1D#Wy5n@L;9i6Dt&lxIqs58jPa&nzKv3X8kC(Y^OGu-JawyV?0In+7a=`XgwbBc4YAnYklhSOFMHp4kt)U-AB zWKndS)5RGjtGn3lPKwwRCn7fDWQ)yqVq#;?V6j7-W1Z2?m19PodQh8V+Q_juXxPv} z1%mCdTJI;e^Jm`_32=46sRL;B)?+^qCpv6U|HAA=#c!-y{q>4@^XBc!?%jJI`5Cz7 zhTd1V?MB@TIu!4dvZ!ipTl_4T@!I0a>933rw;A$y&$&boEo)8xdbnV@6ry2+M-5s% IVB%%;fB$eP+5i9m literal 0 HcmV?d00001 diff --git a/models/Hammer.glb.import b/models/Hammer.glb.import new file mode 100644 index 0000000..4a377d1 --- /dev/null +++ b/models/Hammer.glb.import @@ -0,0 +1,42 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://c4cpduyayg7m" +path="res://.godot/imported/Hammer.glb-56c5f617d7ebd1afee9d21db3ca71ad2.scn" + +[deps] + +source_file="res://models/Hammer.glb" +dest_files=["res://.godot/imported/Hammer.glb-56c5f617d7ebd1afee9d21db3ca71ad2.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/root_script=null +nodes/apply_root_scale=true +nodes/root_scale=0.009999999999999998 +nodes/import_as_skeleton_bones=false +nodes/use_name_suffixes=true +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="" +materials/extract=0 +materials/extract_format=0 +materials/extract_path="" +_subresources={} +gltf/naming_version=2 +gltf/embedded_image_handling=1 diff --git a/models/Hammer_T_Hammer.png b/models/Hammer_T_Hammer.png new file mode 100644 index 0000000000000000000000000000000000000000..911e3973f5d32ef8c2f865a1bf4e95fd4c170898 GIT binary patch literal 131 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Y&~5ZLo9le z@2p<;Z+>HA<3kH=ZDt^FK08&rhew4$El4DpS*N#XBM%6)mtCKbVth5mfXnTmMgs%G Y=2;vJf42wC0UE^M>FVdQ&MBb@0DF-oIRF3v literal 0 HcmV?d00001 diff --git a/models/Hammer_T_Hammer.png.import b/models/Hammer_T_Hammer.png.import new file mode 100644 index 0000000..da4dff4 --- /dev/null +++ b/models/Hammer_T_Hammer.png.import @@ -0,0 +1,44 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://5rjxc4yetqx2" +path.s3tc="res://.godot/imported/Hammer_T_Hammer.png-3e85039454e8f001d18736fd1fee7638.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} +generator_parameters={ +"md5": "6244feb1775a88dcea51d7b35f8ab233" +} + +[deps] + +source_file="res://models/Hammer_T_Hammer.png" +dest_files=["res://.godot/imported/Hammer_T_Hammer.png-3e85039454e8f001d18736fd1fee7638.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=true +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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=0 diff --git a/models/hammer_vis.gd b/models/hammer_vis.gd new file mode 100644 index 0000000..13ac7ed --- /dev/null +++ b/models/hammer_vis.gd @@ -0,0 +1,16 @@ +extends Node3D +@onready var hammer_in_viewport: Node3D = $"../Character/Head/Hammer In Viewport" +@onready var hammer_shelf_vis: Node3D = $Hammer + +var isHammerInViewport:bool = false + +func _input(event: InputEvent) -> void: + if event.is_action_pressed("hammer_toggle"): + isHammerInViewport = !isHammerInViewport + if isHammerInViewport: + hammer_in_viewport.visible = true + hammer_shelf_vis.visible = false + else: + hammer_in_viewport.visible = false + hammer_shelf_vis.visible = true + diff --git a/models/hammer_vis.gd.uid b/models/hammer_vis.gd.uid new file mode 100644 index 0000000..27329f5 --- /dev/null +++ b/models/hammer_vis.gd.uid @@ -0,0 +1 @@ +uid://dcym4t8d3muis diff --git a/project.godot b/project.godot index e29cc60..5768ae4 100644 --- a/project.godot +++ b/project.godot @@ -109,6 +109,16 @@ blend={ "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":66,"key_label":0,"unicode":98,"location":0,"echo":false,"script":null) ] } +hammer_toggle={ +"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":67,"key_label":0,"unicode":99,"location":0,"echo":false,"script":null) +] +} +hammering={ +"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":90,"key_label":0,"unicode":121,"location":0,"echo":false,"script":null) +] +} [physics] diff --git a/scenes/hammering.gd b/scenes/hammering.gd new file mode 100644 index 0000000..e1f8017 --- /dev/null +++ b/scenes/hammering.gd @@ -0,0 +1,26 @@ +extends Node3D + + +@onready var body_animaiton: AnimationPlayer = $"../../../CoffinSwitcher/CoffinOpenable/AnimatedBody/AnimationPlayer" +@onready var hammer_animation: AnimationPlayer = $AnimationPlayer +@onready var face: MeshInstance3D = $"../../../CoffinSwitcher/CoffinOpenable/AnimatedBody/Armature/Skeleton3D/BoneAttachment3D/Body_002" + +var uv_base:Vector3 = Vector3(0.,.25,0.) +var uv_after_hit: Vector3 = Vector3(.5,0.,0.) + +func _input(event: InputEvent) -> void: + if event.is_action_pressed("hammering"): + var tween = get_tree().create_tween() + + hammer_animation.play("swing") + + tween.tween_interval(0.3) + tween.tween_callback(body_animaiton.play.bind("Face Hit")) + tween.tween_callback(setuv.bind(uv_after_hit)) + + if event.is_action_pressed("ui_left"): + setuv(uv_base) + +func setuv(value:Vector3): + var faceMat:BaseMaterial3D = face.get_active_material(0) + faceMat.uv1_offset = value diff --git a/scenes/hammering.gd.uid b/scenes/hammering.gd.uid new file mode 100644 index 0000000..4bd9ef2 --- /dev/null +++ b/scenes/hammering.gd.uid @@ -0,0 +1 @@ +uid://gy52d2t3moyx diff --git a/scenes/room.tscn b/scenes/room.tscn index eef0dba..fab3ac5 100644 --- a/scenes/room.tscn +++ b/scenes/room.tscn @@ -1,11 +1,9 @@ -[gd_scene load_steps=91 format=4 uid="uid://157h04x0krfu"] +[gd_scene load_steps=92 format=4 uid="uid://157h04x0krfu"] [ext_resource type="PackedScene" uid="uid://bjufextny1icg" path="res://models/UndertakerAssets.glb" id="1_7dqbv"] [ext_resource type="ArrayMesh" uid="uid://c5hhygnuya8m4" path="res://models/ceiling.res" id="1_jn645"] [ext_resource type="PackedScene" uid="uid://vqn2vnm5uonx" path="res://models/AnimatedBody.glb" id="1_wg1up"] -[ext_resource type="Texture2D" uid="uid://cmctogmnkjjsx" path="res://models/AnimatedBody_T_Face.png" id="2_ns543"] [ext_resource type="ArrayMesh" uid="uid://clarjq81uknpt" path="res://models/door.res" id="2_qvc4m"] -[ext_resource type="Script" uid="uid://btddh0r45yuh4" path="res://scenes/just_blend.gd" id="2_wkj6l"] [ext_resource type="ArrayMesh" uid="uid://bvdlv1xumxsvr" path="res://models/duct.res" id="3_7dqbv"] [ext_resource type="PackedScene" uid="uid://be7u1kn41g2ww" path="res://addons/interaction/interactable.tscn" id="3_w68ji"] [ext_resource type="ArrayMesh" uid="uid://nvm86aghye8t" path="res://models/floor.res" id="4_ybpoa"] @@ -24,6 +22,7 @@ [ext_resource type="PackedScene" uid="uid://bwf1m3q64007x" path="res://prefabs/lamp_ceiling.tscn" id="16_vfrn5"] [ext_resource type="ArrayMesh" uid="uid://cemnmemdquy7" path="res://models/lamp_wall.res" id="17_vfrn5"] [ext_resource type="ArrayMesh" uid="uid://bbdtm4w2gihid" path="res://models/liftarms.res" id="19_2ulci"] +[ext_resource type="Script" uid="uid://gy52d2t3moyx" path="res://scenes/hammering.gd" id="19_jr8j8"] [ext_resource type="VoxelGIData" uid="uid://rfxeiyxkedo6" path="res://scenes/room.VoxelGI_data.res" id="19_jxwrd"] [ext_resource type="ArrayMesh" uid="uid://d0uaw7ewx52pp" path="res://models/coffin_lower.res" id="19_yggoe"] [ext_resource type="ArrayMesh" uid="uid://bel68d6prmovl" path="res://models/coffin_upper.res" id="20_2ulci"] @@ -33,6 +32,7 @@ [ext_resource type="ArrayMesh" uid="uid://buy1tqwpmqsb4" path="res://models/button.res" id="25_2ftkj"] [ext_resource type="Script" uid="uid://b22xrvio2577x" path="res://scenes/coffin_slide_fire.gd" id="27_ny2il"] [ext_resource type="ArrayMesh" uid="uid://vtl7yxfd4hhq" path="res://models/main_screen.res" id="28_gjarb"] +[ext_resource type="Texture2D" uid="uid://dvgdewx5cksgk" path="res://models/Body_T_Face.png" id="28_rhbk5"] [ext_resource type="Script" uid="uid://bysnkaditp712" path="res://scenes/main_screen.gd" id="29_1wmww"] [ext_resource type="Texture2D" uid="uid://bqkfnastii3yn" path="res://screens/contract-1.png" id="29_5o3hq"] [ext_resource type="Texture2D" uid="uid://7s837i2pg2t4" path="res://screens/contract-2_NEW_2.png" id="30_1wmww"] @@ -50,6 +50,8 @@ [ext_resource type="PackedScene" uid="uid://dcvhqqp75xtws" path="res://prefabs/rose.tscn" id="48_1s4n5"] [ext_resource type="Script" uid="uid://bgrc6ktuxyrm6" path="res://scenes/pickupable.gd" id="49_bahpm"] [ext_resource type="PackedScene" uid="uid://cddhjs1rtgotq" path="res://models/RubberDuck.glb" id="50_11at7"] +[ext_resource type="PackedScene" uid="uid://c4cpduyayg7m" path="res://models/Hammer.glb" id="51_gmm1g"] +[ext_resource type="Script" uid="uid://dcym4t8d3muis" path="res://models/hammer_vis.gd" id="52_rhbk5"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_frp7b"] albedo_color = Color(0, 0, 0, 1) @@ -65,6 +67,66 @@ height = 0.01 [sub_resource type="BoxShape3D" id="BoxShape3D_vfrn5"] size = Vector3(50, 1, 50) +[sub_resource type="Animation" id="Animation_d3vt8"] +resource_name = "swing" +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Hammer:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.13333334, 0.27106056, 0.36666667, 0.56666666, 1), +"transitions": PackedFloat32Array(1.5691682, 1, 1.4142137, 0.24148425, 1, 1.8025008), +"update": 0, +"values": [Vector3(0.4108131, -0.26517308, -0.27325583), Vector3(0.39777717, 0.057593107, -0.25365797), Vector3(0.39777717, 0.057593107, -0.25365797), Vector3(0.13994613, -0.04627271, -0.7106246), Vector3(0.14, 0.049, -0.646), Vector3(0.4108131, -0.26517308, -0.27325583)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Hammer:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.13333334, 0.27106056, 0.36666667, 0.56666666, 1), +"transitions": PackedFloat32Array(1.5691682, 1, 1.4142137, 0.24148425, 1, 1.8025008), +"update": 0, +"values": [Vector3(0.11430395, -1.5166974, 0.7919705), Vector3(0.1143039, -1.5166973, 0.18115765), Vector3(0.1143039, -1.5166973, 0.18115765), Vector3(0.1607498, -1.3422315, 1.0099306), Vector3(0.1607498, -1.3422315, 1.0099306), Vector3(0.11430395, -1.5166974, 0.7919705)] +} + +[sub_resource type="Animation" id="Animation_jr8j8"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Hammer:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0.4108131, -0.26517308, -0.27325583)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Hammer:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0.11430395, -1.5166974, 0.7919705)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_lxjld"] +_data = { +&"RESET": SubResource("Animation_jr8j8"), +&"swing": SubResource("Animation_d3vt8") +} + [sub_resource type="Animation" id="Animation_2ftkj"] resource_name = "CoffinClose" length = 1.304 @@ -158,7 +220,7 @@ _data = { [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2b7e3"] resource_name = "M_Face" cull_mode = 2 -albedo_texture = ExtResource("2_ns543") +albedo_texture = ExtResource("28_rhbk5") roughness = 0.5 uv1_offset = Vector3(0.75, 0.25, 0) texture_filter = 2 @@ -195,24 +257,6 @@ _surfaces = [{ blend_shape_mode = 0 shadow_mesh = SubResource("ArrayMesh_mwhaa") -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ns543"] -animation = &"ArmatureAction" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_g8dr5"] -animation = &"ArmatureAction" - -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_xtec0"] - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xcuph"] -graph_offset = Vector2(-492, 145) -nodes/Animation/node = SubResource("AnimationNodeAnimation_g8dr5") -nodes/Animation/position = Vector2(-200, 120) -nodes/Blend2/node = SubResource("AnimationNodeBlend2_xtec0") -nodes/Blend2/position = Vector2(100, 160) -"nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_ns543") -"nodes/Animation 2/position" = Vector2(-220, 320) -node_connections = [&"output", 0, &"Blend2", &"Blend2", 0, &"Animation", &"Blend2", 1, &"Animation 2"] - [sub_resource type="BoxShape3D" id="BoxShape3D_bahpm"] size = Vector3(0.41427612, 0.09663391, 0.3550415) @@ -668,6 +712,21 @@ transform = Transform3D(-1.0392305, 0, -0.5999999, 0, 1.1999999, 0, 0.5999999, 0 [node name="Camera" parent="Character/Head" index="0"] current = true +[node name="InteractionRay" parent="Character/Head" index="3"] +visible = false + +[node name="Hammer In Viewport" type="Node3D" parent="Character/Head" index="5"] +transform = Transform3D(0.35, 0, 0, 0, 0.35, 0, 0, 0, 0.35, 0, 0, 0) +script = ExtResource("19_jr8j8") + +[node name="Hammer" parent="Character/Head/Hammer In Viewport" instance=ExtResource("51_gmm1g")] +transform = Transform3D(-0.08615163, -0.23697144, -1.9840418, 1.4141886, 1.3957207, -0.22811039, 1.411612, -1.4127308, 0.107439354, 0.4108131, -0.26517308, -0.27325583) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="Character/Head/Hammer In Viewport"] +libraries = { +&"": SubResource("AnimationLibrary_lxjld") +} + [node name="Lever" parent="." instance=ExtResource("6_dynfe")] transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -1.9271023, 1.3349965, 2.5290997) @@ -732,12 +791,6 @@ skeleton = NodePath("") [node name="Body_001" parent="CoffinSwitcher/CoffinOpenable/AnimatedBody" index="1"] visible = false -[node name="AnimationTree" type="AnimationTree" parent="CoffinSwitcher/CoffinOpenable/AnimatedBody"] -tree_root = SubResource("AnimationNodeBlendTree_xcuph") -anim_player = NodePath("../AnimationPlayer") -parameters/Blend2/blend_amount = 0.0 -script = ExtResource("2_wkj6l") - [node name="StaticBody3D" type="StaticBody3D" parent="CoffinSwitcher/CoffinOpenable"] [node name="CollisionShape3D" type="CollisionShape3D" parent="CoffinSwitcher/CoffinOpenable/StaticBody3D"] @@ -1228,6 +1281,12 @@ transform = Transform3D(-0.007914604, -0.00079391425, -0.018350165, -0.000733232 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.1297956, 1.00343, 2.6191468) mesh = SubResource("BoxMesh_gmm1g") +[node name="Hammer_on_shelf" type="Node3D" parent="."] +script = ExtResource("52_rhbk5") + +[node name="Hammer" parent="Hammer_on_shelf" instance=ExtResource("51_gmm1g")] +transform = Transform3D(0.5660891, -1.9103099, 0.1739514, 0, 0.18136814, 1.9917594, -1.9182135, -0.56375664, 0.051335264, -0.75209147, 1.0442615, -2.8823638) + [connection signal="changed" from="Lever" to="CoffinSwitcher/CoffinOpenable" method="_on_lever_changed"] [connection signal="on_hit" from="Button/Interactable" to="CoffinSwitcher/CoffinSlideFire" method="_on_interactable_on_hit"] [connection signal="on_hit" from="Button2/Interactable" to="CoffinSwitcher/CoffinSlideFire" method="_on_interactable_on_hit"]