Added animated body

This commit is contained in:
jonathan
2026-02-01 14:40:59 +01:00
parent 6af2938769
commit 6f2f5a2df9
18 changed files with 432 additions and 6 deletions
+19
View File
@@ -0,0 +1,19 @@
extends AnimationTree
var tween: Tween = null
func _input(event: InputEvent) -> void:
if event.is_action_pressed("blend"):
if tween != null:
tween.kill()
tween = get_tree().create_tween()
tween.set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC)
tween.tween_method(set_blend,0.,1.,0.4)
if event.is_action_pressed("ui_left"):
set_blend(0)
func set_blend(value:float):
self["parameters/Blend2/blend_amount"] = value
pass
+1
View File
@@ -0,0 +1 @@
uid://btddh0r45yuh4
+103 -6
View File
@@ -1,8 +1,11 @@
[gd_scene load_steps=60 format=4 uid="uid://157h04x0krfu"]
[gd_scene load_steps=70 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://iitrxdpdaq0i" 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://17chuhi8kh01" 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://duokqbm5xp6mc" 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://bjt6sta5lnhjr" path="res://models/floor.res" id="4_ybpoa"]
@@ -40,6 +43,64 @@
[ext_resource type="Texture2D" uid="uid://cin2sxy6ypjji" path="res://screens/NO-contract.png" id="35_wkj6l"]
[ext_resource type="Texture2D" uid="uid://cn7yi35kntfwt" path="res://screens/LAST-contract.png" id="36_ns543"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2b7e3"]
resource_name = "M_Face"
cull_mode = 2
albedo_texture = ExtResource("2_ns543")
roughness = 0.5
uv1_offset = Vector3(0.5, 0, 0)
texture_filter = 2
[sub_resource type="ArrayMesh" id="ArrayMesh_mwhaa"]
_surfaces = [{
"aabb": AABB(-0.18719779, 0.101959825, -0.16023456, 0.34999996, 0.060000047, 0.3204691),
"format": 34896613377,
"index_count": 24,
"index_data": PackedByteArray("AAABAAIAAAADAAEABAABAAMABAAFAAEAAgABAAYABQAGAAEAAgAGAAcABQAIAAYA"),
"name": "M_Face",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 9,
"vertex_data": PackedByteArray("////fwAAAAC2bf///38AALZt//8AAAAA////f/9/AAD///9///8AALZt/////wAAAAAAAP9/AADxFQAA9hcAAPEVAAAI6AAA")
}]
blend_shape_mode = 0
[sub_resource type="ArrayMesh" id="ArrayMesh_r8gds"]
resource_name = "AnimatedBody_Cube_047"
_surfaces = [{
"aabb": AABB(-0.18719779, 0.101959825, -0.16023456, 0.34999996, 0.060000047, 0.3204691),
"attribute_data": PackedByteArray("/x8AAP87/yP/H/8j/zsAAP8D/yP/H/87/wf/N/8f/yP/HwAA/wP/I/8DAAD/H/8j/zv/I/8f/zv/H/8j/zf/Nw=="),
"format": 34896613399,
"index_count": 24,
"index_data": PackedByteArray("AAABAAIAAAADAAEABAAFAAYABAAHAAUACAAJAAoACAALAAkADAANAA4ADAAPAA0A"),
"material": SubResource("StandardMaterial3D_2b7e3"),
"name": "M_Face",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 16,
"vertex_data": PackedByteArray("////fwAA6ti2bf///3/q2LZt//8AAOrY////f/9/6ti2bf//AACCzQAAAAD/f4LN8RUAAPYXjs22bf///394zf///3///+rYtm3///9/6tj///9//3/q2LZt/////+rYtm3/////5MoAAAAA/3/kyrZt////f+7K8RUAAAjo1sq7rIamu6yGprushqa7rIamdaR7uHWkfLhfpIS4hKR3uLushqa7rIamu6yGprushqa4ox23uKMdt6mjILfNoxe3")
}]
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 = &"Weird Pos"
[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_xtec0"]
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xcuph"]
graph_offset = Vector2(-753.6569, 63.098648)
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="StandardMaterial3D" id="StandardMaterial3D_frp7b"]
albedo_color = Color(0, 0, 0, 1)
emission_enabled = true
@@ -341,6 +402,41 @@ bind/17/pose = Transform3D(0.0746971, 0, 0, 0, 0, -0.0746971, 0, 0.0746971, 0, 0
[node name="BlockoutRoom" type="Node3D"]
[node name="AnimatedBody" parent="." instance=ExtResource("1_wg1up")]
[node name="Skeleton3D" parent="AnimatedBody/Armature" index="0"]
bones/1/rotation = Quaternion(0.98481596, -0.00083194015, 0.17332742, 0.009715752)
bones/2/rotation = Quaternion(0.026424047, -0.0002678612, -0.02301538, 0.99938583)
bones/4/rotation = Quaternion(0.98481596, -0.00083192455, 0.17332749, 0.009715752)
bones/5/rotation = Quaternion(0.026424043, -0.00026785373, -0.02301536, 0.99938583)
bones/6/rotation = Quaternion(-0.24330616, 0.009764576, 0.62130296, 0.74477476)
bones/9/rotation = Quaternion(-0.86570036, 0.19894437, -0.44322658, -0.120557964)
bones/10/rotation = Quaternion(-0.18447517, 0.35387474, -0.6469678, 0.64974934)
bones/11/rotation = Quaternion(0.013044027, -0.2410653, 0.045270618, 0.9693647)
bones/12/rotation = Quaternion(0.97710764, -0.21059328, -0.023610441, 0.01880603)
bones/13/rotation = Quaternion(0.64828163, 0.12760647, 0.013005167, 0.7505188)
bones/14/rotation = Quaternion(-0.035038, -0.0047629066, -0.00039249362, 0.99937457)
bones/16/rotation = Quaternion(-7.511955e-09, -1.8198413e-07, 0.032410674, 0.99947464)
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="AnimatedBody/Armature/Skeleton3D" index="0"]
transform = Transform3D(0.47932008, 0.87764007, 2.4056902e-08, -0.87764007, 0.47932008, -4.3557066e-08, -4.9758285e-08, -2.356213e-10, 1.0000002, 0.046313114, 0.0039921002, 0.0007469526)
bone_name = "root.004"
bone_idx = 16
[node name="Body_002" type="MeshInstance3D" parent="AnimatedBody/Armature/Skeleton3D/BoneAttachment3D"]
transform = Transform3D(-0.0026715081, -0.07464932, -3.7168064e-09, 0.07464932, -0.0026715081, -1.7592976e-11, -1.1534074e-10, -3.7150507e-09, 0.07469708, 0.0001797378, 0.012750886, 1.7568469e-05)
mesh = SubResource("ArrayMesh_r8gds")
skeleton = NodePath("")
[node name="AnimationTree" type="AnimationTree" parent="AnimatedBody"]
tree_root = SubResource("AnimationNodeBlendTree_xcuph")
anim_player = NodePath("../AnimationPlayer")
parameters/Blend2/blend_amount = 1.0
script = ExtResource("2_wkj6l")
[node name="Body_001" parent="AnimatedBody" index="2"]
visible = false
[node name="UndertakerAssets" parent="." instance=ExtResource("1_7dqbv")]
visible = false
@@ -468,7 +564,7 @@ shape = SubResource("BoxShape3D_vfrn5")
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)
transform = Transform3D(-1.0392305, 0, -0.5999999, 0, 1.1999999, 0, 0.5999999, 0, -1.0392305, 0.40905392, 0.02320534, -1.7041746)
[node name="Camera" parent="Character/Head" index="0"]
current = true
@@ -679,14 +775,14 @@ bones/9/parent = 8
bones/9/rest = Transform3D(0.5773324, 0.028845817, 0.81599945, -0.815948, -0.016662877, 0.57788503, 0.030266462, -0.999445, 0.0139166685, -0.0026226677, 0.012837223, -0.017323503)
bones/9/enabled = true
bones/9/position = Vector3(-0.0026226677, 0.012837223, -0.017323503)
bones/9/rotation = Quaternion(-0.483, 0.122, -0.865, -0.056)
bones/9/rotation = Quaternion(-0.62850595, 0.31308472, -0.33661819, 0.62741256)
bones/9/scale = Vector3(0.9999999, 1, 0.99999994)
bones/10/name = "ArmLower.R"
bones/10/parent = 9
bones/10/rest = Transform3D(0.9132244, 0.027231088, 0.4065456, -0.047968037, 0.99801105, 0.040902346, -0.40462315, -0.05685423, 0.9127144, -4.470348e-09, 0.020974979, -2.8312206e-09)
bones/10/enabled = true
bones/10/position = Vector3(-4.470348e-09, 0.020974979, -2.8312206e-09)
bones/10/rotation = Quaternion(0.315, 0.28, -0.447, 0.789)
bones/10/rotation = Quaternion(-0.024995388, 0.20740785, -0.019227674, 0.9777461)
bones/10/scale = Vector3(0.9999998, 1, 0.99999994)
bones/11/name = "Hand.R"
bones/11/parent = 10
@@ -700,14 +796,14 @@ bones/12/parent = 8
bones/12/rest = Transform3D(0.99829376, 0.047837634, 0.03348283, 0.036318686, -0.059696436, -0.99755573, -0.0457219, 0.9970697, -0.061331987, -0.0029291161, 0.013555873, 0.017061872)
bones/12/enabled = true
bones/12/position = Vector3(-0.0029291161, 0.013555873, 0.017061872)
bones/12/rotation = Quaternion(0.864, -0.056, 0.486, 0.118)
bones/12/rotation = Quaternion(0.72789466, 0.028904023, -0.004203589, 0.68506664)
bones/12/scale = Vector3(1, 1, 1)
bones/13/name = "ArmLower.L"
bones/13/parent = 12
bones/13/rest = Transform3D(0.89337415, -0.05431128, 0.44601905, 0.049797535, 0.99852043, 0.021844571, -0.44654548, 0.0026952708, 0.89475703, -2.4586915e-09, 0.02118821, -1.3411044e-09)
bones/13/enabled = true
bones/13/position = Vector3(-2.4586915e-09, 0.02118821, -1.3411044e-09)
bones/13/rotation = Quaternion(0.131, 0.094, 0.43, 0.888)
bones/13/rotation = Quaternion(-0.0049203425, 0.22934115, 0.026750375, 0.972966)
bones/13/scale = Vector3(1, 1, 1.0000001)
bones/14/name = "Hand.L"
bones/14/parent = 13
@@ -746,5 +842,6 @@ skin = SubResource("Skin_cbukb")
[connection signal="on_hit" from="Button/Interactable" to="CoffinSlideFire" method="_on_interactable_on_hit"]
[connection signal="on_hit" from="Button2/Interactable" to="CoffinSlideFire" method="_on_interactable_on_hit"]
[editable path="AnimatedBody"]
[editable path="UndertakerAssets"]
[editable path="Character"]