From a918f952ce94174c1ba400e59c79de30dbd4b6e3 Mon Sep 17 00:00:00 2001 From: jonathan Date: Thu, 29 Jan 2026 23:41:16 +0100 Subject: [PATCH] Added coffin animations --- scenes/room.tscn | 271 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 270 insertions(+), 1 deletion(-) diff --git a/scenes/room.tscn b/scenes/room.tscn index c79b2f3..06abe58 100644 --- a/scenes/room.tscn +++ b/scenes/room.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=22 format=3 uid="uid://157h04x0krfu"] +[gd_scene load_steps=35 format=3 uid="uid://157h04x0krfu"] [ext_resource type="PackedScene" uid="uid://bjufextny1icg" path="res://models/UndertakerAssets.glb" id="1_7dqbv"] [ext_resource type="ArrayMesh" uid="uid://iitrxdpdaq0i" path="res://models/ceiling.res" id="1_jn645"] @@ -18,11 +18,211 @@ [ext_resource type="ArrayMesh" uid="uid://d1echoo5nispa" path="res://models/pipe.res" id="15_2ulci"] [ext_resource type="PackedScene" uid="uid://bwf1m3q64007x" path="res://prefabs/lamp_ceiling.tscn" id="16_vfrn5"] [ext_resource type="ArrayMesh" uid="uid://d0uvr0bshllbo" path="res://models/lamp_wall.res" id="17_vfrn5"] +[ext_resource type="ArrayMesh" uid="uid://bww0dtmtdvf4r" path="res://models/liftarms.res" id="19_2ulci"] [ext_resource type="VoxelGIData" uid="uid://rfxeiyxkedo6" path="res://scenes/room.VoxelGI_data.res" id="19_jxwrd"] +[ext_resource type="ArrayMesh" uid="uid://te2j13rctqpb" path="res://models/coffin_lower.res" id="19_yggoe"] +[ext_resource type="ArrayMesh" uid="uid://uos83uc5mxn7" path="res://models/coffin_upper.res" id="20_2ulci"] [sub_resource type="BoxShape3D" id="BoxShape3D_vfrn5"] size = Vector3(50, 1, 50) +[sub_resource type="Animation" id="Animation_a5qmg"] +resource_name = "CoffinOpen" +length = 1.3 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("ArmsAnimationPivot:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.5, 0.6, 0.7073554, 0.8, 1.3), +"transitions": PackedFloat32Array(1.9, 0.6155722, 1.7411014, 1, 1.9, 1), +"update": 0, +"values": [Vector3(0, 2, 0), Vector3(0, 0, 0), Vector3(0, 0.2, 0), Vector3(0, 0, 0), Vector3(0, 0, 0), Vector3(0, 2, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("LidAnimationPivit:position") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.8, 1.3), +"transitions": PackedFloat32Array(1, 1.9, 1), +"update": 0, +"values": [Vector3(0, 0, 0), Vector3(0, 0, 0), Vector3(0, 2, 0)] +} + +[sub_resource type="Animation" id="Animation_0tws2"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("ArmsAnimationPivot:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0, 2, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("LidAnimationPivit:position") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0, 0, 0)] +} + +[sub_resource type="Animation" id="Animation_2ftkj"] +resource_name = "CoffinClose" +length = 1.304 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("LidAnimationPivit:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.26666668, 0.5, 0.6, 0.7073554, 0.8005095, 0.9, 1.3), +"transitions": PackedFloat32Array(1.5, 1, 0.6155722, 1.7411014, 1, 1.7411014, 1, 1.9), +"update": 0, +"values": [Vector3(0, 2, 0), Vector3(0, 1.147542, 0), Vector3(0, 0, 0), Vector3(0, 0.2, 0), Vector3(0, 0, 0), Vector3(0, 0.1, 0), Vector3(0, 0, 0), Vector3(0, 0, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("ArmsAnimationPivot:position") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.26601925, 0.33333334, 0.5810743, 1.3), +"transitions": PackedFloat32Array(1.5, 1, 0.6155722, 0.6155722, 1), +"update": 0, +"values": [Vector3(0, 2, 0), Vector3(0, 1.147542, 0), Vector3(0, 0.8, 0), Vector3(0, 0.8, 0), Vector3(0, 2, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_0tws2"] +_data = { +&"CoffinClose": SubResource("Animation_2ftkj"), +&"CoffinOpen": SubResource("Animation_a5qmg"), +&"RESET": SubResource("Animation_0tws2") +} + +[sub_resource type="Animation" id="Animation_kk8bn"] +resource_name = "CoffinSlideOut" +length = 1.341 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.30037925, 0.36666673, 0.6842738, 0.86666673, 1.3333333), +"transitions": PackedFloat32Array(1, 1, 1, 1, 0.75785816, 1), +"update": 0, +"values": [Vector3(0, 1.7166598, 1.2106416), Vector3(0, 0.48455417, 1.2106416), Vector3(0, 0.41474366, 1.1659725), Vector3(0, 0.3235836, 0.691334), Vector3(0, 0.18653977, 0.4367776), Vector3(0, 0, 0)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath(".:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 0.3, 0.36666673, 0.6842738, 0.86666673, 1.3333333), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1.5157177, 1), +"update": 0, +"values": [Vector3(0, 0, 0), Vector3(0, 0, 0), Vector3(-0.22458895, 0, 0), Vector3(-0.22458893, 0, 0), Vector3(-0.43657658, 0, 0), Vector3(0, 0, 0)] +} + +[sub_resource type="Animation" id="Animation_mc3m6"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(0, 1.7166598, 1.2106416)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath(".:rotation") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector3(-0.22458895, 0, 0)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_mc3m6"] +_data = { +&"CoffinSlideOut": SubResource("Animation_kk8bn"), +&"RESET": SubResource("Animation_mc3m6") +} + +[sub_resource type="Animation" id="Animation_yggoe"] +resource_name = "CoffinSlideFire" +length = 2.0 +tracks/0/type = "bezier" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimParent:position:x") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"handle_modes": PackedInt32Array(2, 2, 2, 0, 2), +"points": PackedFloat32Array(0, -0.487, 0, 0.20014383, 0, -0.45, -0.2, 0, 0.02, 0, -0.2696182, -0.047737252, -0.099416435, 0.33333337, 0.69419193, 7.4663363, -0.0666666, -4.989369, 0.18296194, 0.016600132, 7.4821897, -0.43333328, 0.017345905, 0, 0), +"times": PackedFloat32Array(0, 0.5, 0.73333335, 1.2666667, 2.0333333) +} +tracks/1/type = "bezier" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("AnimParent:position:y") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"handle_modes": PackedInt32Array(), +"points": PackedFloat32Array(), +"times": PackedFloat32Array() +} +tracks/2/type = "bezier" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("AnimParent:position:z") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"handle_modes": PackedInt32Array(), +"points": PackedFloat32Array(), +"times": PackedFloat32Array() +} + +[sub_resource type="Animation" id="Animation_2ulci"] +length = 0.001 + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_kk8bn"] +_data = { +&"CoffinSlideFire": SubResource("Animation_yggoe"), +&"RESET": SubResource("Animation_2ulci") +} + [sub_resource type="Environment" id="Environment_katsu"] tonemap_mode = 3 @@ -153,6 +353,75 @@ debug_fill = false [node name="Character" parent="." instance=ExtResource("5_3j2fx")] transform = Transform3D(-1.0392305, 0, -0.5999999, 0, 1.1999999, 0, 0.5999999, 0, -1.0392305, 0, 0.02320534, 0) +[node name="CoffinOpenable" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.24035808, 0.8164685, 2.485278) + +[node name="ArmsAnimationPivot" type="Node3D" parent="CoffinOpenable"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0) + +[node name="Liftarms" type="MeshInstance3D" parent="CoffinOpenable/ArmsAnimationPivot"] +transform = Transform3D(0, 1, 0, -1, 0, 0, 0, 0, 1, 1.9822427, 0.5227046, 0.550565) +mesh = ExtResource("19_2ulci") +skeleton = NodePath("") + +[node name="LidAnimationPivit" type="Node3D" parent="CoffinOpenable"] + +[node name="CoffinUpper" type="MeshInstance3D" parent="CoffinOpenable/LidAnimationPivit"] +transform = Transform3D(1, 0, 0, 0, -1, -8.742278e-08, 0, 8.742278e-08, -1, -0.014046758, 0.5784328, 0) +mesh = ExtResource("20_2ulci") +skeleton = NodePath("../../../..") + +[node name="CoffinLower" type="MeshInstance3D" parent="CoffinOpenable"] +mesh = ExtResource("19_yggoe") +skeleton = NodePath("../..") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="CoffinOpenable"] +libraries = { +&"": SubResource("AnimationLibrary_0tws2") +} + +[node name="CoffinSlideOut" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.24035808, 0.8164685, 2.485278) +visible = false + +[node name="AnimationPlayer" type="AnimationPlayer" parent="CoffinSlideOut"] +root_node = NodePath("../AnimParent") +libraries = { +&"": SubResource("AnimationLibrary_mc3m6") +} + +[node name="AnimParent" type="Node3D" parent="CoffinSlideOut"] +transform = Transform3D(1, 0, 0, 0, 0.97488576, 0.22270565, 0, -0.22270565, 0.97488576, 0, 1.7166598, 1.2106416) + +[node name="CoffinLower" type="MeshInstance3D" parent="CoffinSlideOut/AnimParent"] +mesh = ExtResource("19_yggoe") +skeleton = NodePath("../../..") + +[node name="CoffinUpper" type="MeshInstance3D" parent="CoffinSlideOut/AnimParent"] +transform = Transform3D(1, 0, 0, 0, -1, -8.742278e-08, 0, 8.742278e-08, -1, -0.014046758, 0.5784328, 0) +mesh = ExtResource("20_2ulci") +skeleton = NodePath("../../..") + +[node name="CoffinSlideFire" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.24035808, 0.8164685, 2.485278) +visible = false + +[node name="AnimationPlayer" type="AnimationPlayer" parent="CoffinSlideFire"] +libraries = { +&"": SubResource("AnimationLibrary_kk8bn") +} + +[node name="AnimParent" type="Node3D" parent="CoffinSlideFire"] + +[node name="CoffinLower" type="MeshInstance3D" parent="CoffinSlideFire/AnimParent"] +mesh = ExtResource("19_yggoe") +skeleton = NodePath("../../..") + +[node name="CoffinUpper" type="MeshInstance3D" parent="CoffinSlideFire/AnimParent"] +transform = Transform3D(1, 0, 0, 0, -1, -8.742278e-08, 0, 8.742278e-08, -1, -0.014046758, 0.5784328, 0) +mesh = ExtResource("20_2ulci") +skeleton = NodePath("../../..") + [node name="Misc" type="Node" parent="."] [node name="DirectionalLight3D" type="DirectionalLight3D" parent="Misc"]