Fixed the character's model.

This commit is contained in:
Relintai 2022-08-20 02:44:58 +02:00
parent ac466fdb10
commit 010f386170
2 changed files with 11 additions and 34 deletions

View File

@ -140,34 +140,11 @@ script = ExtResource( 1 )
[node name="Skeleton" parent="armature/Armature" index="0"] [node name="Skeleton" parent="armature/Armature" index="0"]
transform = Transform( 1, -6.84064e-18, 1.54087e-25, 6.84064e-18, 1, 1.05378e-42, -1.54087e-25, 0, 1, 0, 0, 0 ) transform = Transform( 1, -6.84064e-18, 1.54087e-25, 6.84064e-18, 1, 1.05378e-42, -1.54087e-25, 0, 1, 0, 0, 0 )
bones/1/position = Vector3( 0.005287, 0.77222, -0.000216 )
bones/1/rotation = Quaternion( 0, 0, -0.00911221, 0.999959 )
bones/2/rotation = Quaternion( 0.996655, 0.042684, 0.0163238, 0.0677455 )
bones/3/rotation = Quaternion( 0.155903, 0.0044376, 0.0191078, 0.987578 )
bones/4/rotation = Quaternion( -0.642765, -0.0351873, -0.017575, 0.765053 )
bones/5/rotation = Quaternion( 0.99756, -0.0370777, -0.00960474, 0.0583638 )
bones/6/rotation = Quaternion( 0.132017, -0.0141097, -0.0235327, 0.990868 )
bones/6/scale = Vector3( 1, 1, 1 )
bones/7/rotation = Quaternion( -0.648636, 0.0557981, 0.0039294, 0.75904 )
bones/8/rotation = Quaternion( 0.00795914, -0.0108775, 0.00612897, 0.99989 )
bones/9/rotation = Quaternion( -0.0218694, 0.0149952, 0.0191396, 0.999465 )
bones/10/rotation = Quaternion( 0.0160519, -0.00514767, -0.0123355, 0.999782 )
bones/11/rotation = Quaternion( 0.571937, -0.455816, -0.534522, -0.423563 )
bones/12/rotation = Quaternion( -0.502503, -0.0185204, -0.016367, 0.864222 )
bones/13/rotation = Quaternion( -0.064897, 0.00541535, 0.00695547, 0.997853 )
bones/16/rotation = Quaternion( -0.00345063, 0.00680394, -0.544148, 0.838954 )
bones/19/rotation = Quaternion( 0.575189, 0.450001, 0.538761, -0.419991 )
bones/20/rotation = Quaternion( -0.499913, 0.028569, -0.00321316, 0.865598 )
bones/25/rotation = Quaternion( -0.250815, 0.891551, 0.354786, 0.127888 )
bones/26/rotation = Quaternion( 0.00191382, 0.00156001, 0.547403, 0.836865 )
bones/27/rotation = Quaternion( -0.053248, 0.0141767, 0.0255395, 0.998154 )
bones/28/rotation = Quaternion( 0.0261071, 3.52432e-05, 0.000194816, 0.999659 )
[node name="MeshInstance" type="MeshInstance" parent="armature/Armature/Skeleton" index="0"] [node name="MeshInstance" type="MeshInstance" parent="armature/Armature/Skeleton" index="0"]
visible = false
[node name="LeftHandAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="1"] [node name="LeftHandAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="1"]
transform = Transform( 0.169521, 0.130711, -0.97682, 0.0533302, -0.99093, -0.123344, -0.984083, -0.0311846, -0.174954, 0.237737, 0.768186, -0.00798481 ) transform = Transform( 0.162873, 0.125837, -0.978589, 0.0411341, -0.991837, -0.120694, -0.985789, -0.0205955, -0.166719, 0.235595, 0.766393, -0.00373229 )
bone_name = "left_hand" bone_name = "left_hand"
bone_idx = 22 bone_idx = 22
@ -176,7 +153,7 @@ transform = Transform( -0.0646502, 0.683772, 0.726832, -0.148514, -0.726783, 0.6
script = ExtResource( 2 ) script = ExtResource( 2 )
[node name="ShieldAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="2"] [node name="ShieldAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="2"]
transform = Transform( -0.0214982, 0.109075, 0.993801, -0.0392737, -0.993356, 0.108177, 0.998997, -0.0367046, 0.025639, 0.211485, 1.00726, 0.000848927 ) transform = Transform( -0.0146851, 0.104152, 0.994453, -0.027613, -0.994224, 0.10372, 0.99951, -0.0259365, 0.0174763, 0.210529, 1.00567, 0.00250988 )
bone_name = "left_forearm" bone_name = "left_forearm"
bone_idx = 21 bone_idx = 21
@ -184,7 +161,7 @@ bone_idx = 21
transform = Transform( 0.122585, 0.992132, -0.0242311, 0.987746, -0.124342, -0.0941345, -0.0964273, -0.0123912, -0.995239, 0.0157415, 0.108918, 0.0213161 ) transform = Transform( 0.122585, 0.992132, -0.0242311, 0.987746, -0.124342, -0.0941345, -0.0964273, -0.0123912, -0.995239, 0.0157415, 0.108918, 0.0213161 )
[node name="RightHandAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="3"] [node name="RightHandAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="3"]
transform = Transform( -0.11173, -0.0755354, -0.990864, -0.0263245, -0.996532, 0.078936, -0.99339, 0.0349036, 0.109354, -0.247312, 0.768711, 0.00145613 ) transform = Transform( -0.138666, -0.0743759, -0.987542, -0.00282929, -0.997142, 0.075496, -0.990334, 0.0132628, 0.138059, -0.247463, 0.768414, 0.00497063 )
bone_name = "right_hand" bone_name = "right_hand"
bone_idx = 14 bone_idx = 14
@ -202,7 +179,7 @@ transform = Transform( 1, 0, 0, 0, -1.62921e-07, 1, 0, -1, -1.62921e-07, 0, 0, 0
script = ExtResource( 2 ) script = ExtResource( 2 )
[node name="NeckAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="5"] [node name="NeckAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="5"]
transform = Transform( 0.997964, -0.0596316, 0.0226137, 0.056992, 0.993005, 0.103408, -0.0286219, -0.101909, 0.994382, 0.000926388, 1.31361, -0.000980039 ) transform = Transform( 0.999949, -0.00977391, -0.00267528, 0.0099408, 0.997369, 0.0718058, 0.0019664, -0.0718287, 0.997415, 0.000938948, 1.31216, -0.00165971 )
bone_name = "neck" bone_name = "neck"
bone_idx = 27 bone_idx = 27
@ -211,7 +188,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.04, -0.09 )
script = ExtResource( 2 ) script = ExtResource( 2 )
[node name="RightHipAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="6"] [node name="RightHipAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="6"]
transform = Transform( 0.999834, 0.0182237, 0, -0.0182237, 0.999834, 0, 0, 0, 1, 0.005255, 0.77222, 0 ) transform = Transform( 0.9999, 0.0141607, 0, -0.0141607, 0.9999, 0, 0, 0, 1, 0.00686529, 0.77084, 0 )
bone_name = "pelvis" bone_name = "pelvis"
bone_idx = 1 bone_idx = 1
@ -219,7 +196,7 @@ bone_idx = 1
transform = Transform( 0.993372, -0.0110498, 0.114411, 0.0109836, 0.999939, 0.00120905, -0.114417, 5.56017e-05, 0.993433, -0.141825, 0.176866, 0.16621 ) transform = Transform( 0.993372, -0.0110498, 0.114411, 0.0109836, 0.999939, 0.00120905, -0.114417, 5.56017e-05, 0.993433, -0.141825, 0.176866, 0.16621 )
[node name="LeftHipAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="7"] [node name="LeftHipAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="7"]
transform = Transform( 0.999834, 0.0182237, 0, -0.0182237, 0.999834, 0, 0, 0, 1, 0.005255, 0.77222, 0 ) transform = Transform( 0.9999, 0.0141607, 0, -0.0141607, 0.9999, 0, 0, 0, 1, 0.00686529, 0.77084, 0 )
bone_name = "pelvis" bone_name = "pelvis"
bone_idx = 1 bone_idx = 1
@ -227,7 +204,7 @@ bone_idx = 1
transform = Transform( 0.99343, -0.00240871, -0.114417, 0.00240855, 0.999997, -0.000139626, 0.114417, -0.00013687, 0.993433, 0.144429, 0.18077, 0.165634 ) transform = Transform( 0.99343, -0.00240871, -0.114417, 0.00240855, 0.999997, -0.000139626, 0.114417, -0.00013687, 0.993433, 0.144429, 0.18077, 0.165634 )
[node name="RightBackAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="8"] [node name="RightBackAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="8"]
transform = Transform( 0.99997, -0.00742118, -0.00218575, 0.00741279, 0.999965, -0.00382438, 0.00221406, 0.00380806, 0.99999, 0.00231858, 1.12602, -0.00169442 ) transform = Transform( 0.999946, -0.0102172, -0.00182454, 0.0102129, 0.999945, -0.00239254, 0.00184888, 0.00237373, 0.999995, 0.00285567, 1.12457, -0.00210501 )
bone_name = "spine_2" bone_name = "spine_2"
bone_idx = 10 bone_idx = 10
@ -235,7 +212,7 @@ bone_idx = 10
transform = Transform( 0.999997, -0.00244424, -0.000479204, 0.00243884, 0.999966, -3.47705e-05, 0.000479292, 3.44458e-05, 1, 0.000560207, -0.00363708, -0.120332 ) transform = Transform( 0.999997, -0.00244424, -0.000479204, 0.00243884, 0.999966, -3.47705e-05, 0.000479292, 3.44458e-05, 1, 0.000560207, -0.00363708, -0.120332 )
[node name="LeftBackAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="9"] [node name="LeftBackAttachment" type="BoneAttachment" parent="armature/Armature/Skeleton" index="9"]
transform = Transform( 0.99997, -0.00742118, -0.00218575, 0.00741279, 0.999965, -0.00382438, 0.00221406, 0.00380806, 0.99999, 0.00231858, 1.12602, -0.00169442 ) transform = Transform( 0.999946, -0.0102172, -0.00182454, 0.0102129, 0.999945, -0.00239254, 0.00184888, 0.00237373, 0.999995, 0.00285567, 1.12457, -0.00210501 )
bone_name = "spine_2" bone_name = "spine_2"
bone_idx = 10 bone_idx = 10

View File

@ -169,7 +169,7 @@ func build():
var global_pose = skeleton.get_bone_global_pose(bone_idx) var global_pose = skeleton.get_bone_global_pose(bone_idx)
ddict["transform"] = skeleton.get_bone_global_pose(bone_idx) #ddict["transform"] = global_pose
if abi_dict.has(bone_idx): if abi_dict.has(bone_idx):
global_pose *= abi_dict[bone_idx] global_pose *= abi_dict[bone_idx]
@ -238,7 +238,7 @@ func setup_build_mesh() -> void:
get_animation_tree().active = false get_animation_tree().active = false
if get_animation_player() != null: if get_animation_player() != null:
get_animation_player().play("rest") get_animation_player().play("RESET")
get_animation_player().seek(0, true) get_animation_player().seek(0, true)
func finish_build_mesh() -> void: func finish_build_mesh() -> void: