From c996e4cf47f2b26547f08d60e4968188c4236c33 Mon Sep 17 00:00:00 2001 From: ywmaa <68971808+ywmaa@users.noreply.github.com> Date: Wed, 13 Sep 2023 04:22:22 +0300 Subject: [PATCH] bugfix: transition animation from standing walk to crouch walk causes null animation --- AMSG_Examples/Character/mixamo_character.tscn | 349 +++--------------- AMSG_Examples/Player/Player.tscn | 339 +++-------------- addons/AMSG/Components/AnimationBlend.gd | 20 +- .../Components/AnimationTreeBlendTree.tres | 38 +- 4 files changed, 136 insertions(+), 610 deletions(-) diff --git a/AMSG_Examples/Character/mixamo_character.tscn b/AMSG_Examples/Character/mixamo_character.tscn index 55e18c7..e836793 100644 --- a/AMSG_Examples/Character/mixamo_character.tscn +++ b/AMSG_Examples/Character/mixamo_character.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=74 format=3 uid="uid://cth47yn1duvdh"] +[gd_scene load_steps=33 format=3 uid="uid://cth47yn1duvdh"] [ext_resource type="Script" path="res://addons/AMSG/Components/CharacterMovementComponent.gd" id="1_ewnep"] [ext_resource type="Resource" uid="uid://buhjkpv85gdmi" path="res://AMSG_Examples/Character/standing_movement_values.tres" id="2_c4o7m"] @@ -6,6 +6,7 @@ [ext_resource type="PackedScene" uid="uid://dsdvjuk7muqkf" path="res://addons/AMSG/Components/AnimationTreeComponent.tscn" id="3_86f8p"] [ext_resource type="Resource" uid="uid://bo31hnmxahuqb" path="res://AMSG_Examples/Character/crouch_movement_values.tres" id="3_p3fng"] [ext_resource type="ArrayMesh" uid="uid://wpxkyy82pcud" path="res://AMSG_Examples/Character/Mesh/Character_Alpha_Joints.res" id="5_0247x"] +[ext_resource type="AnimationNodeBlendTree" uid="uid://vjkfv8poa6di" path="res://addons/AMSG/Components/AnimationTreeBlendTree.tres" id="5_umod7"] [ext_resource type="ArrayMesh" uid="uid://xm71l8lsa8hp" path="res://AMSG_Examples/Character/Mesh/Character_Alpha_Surface.res" id="6_e2l25"] [ext_resource type="Animation" uid="uid://xhse6rakv0vp" path="res://AMSG_Examples/Character/Animations/CrouchIdle.res" id="7_e4twx"] [ext_resource type="Animation" uid="uid://bfwuav455uabl" path="res://AMSG_Examples/Character/Animations/CrouchWalkingForward.res" id="8_y04sm"] @@ -29,252 +30,6 @@ [ext_resource type="Script" path="res://addons/AMSG/Components/Interaction.gd" id="26_8j4xc"] [ext_resource type="AudioStream" uid="uid://bpnobn6wg8hxp" path="res://AMSG_Examples/Character/footstep_sound/footstep2.wav" id="27_cpdra"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_mb2kt"] -animation = &"TurnLeft" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_2rfjg"] -animation = &"TurnRight" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_v6381"] -animation = &"Falling" - -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_nojly"] -sync = true - -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_85ljr"] -sync = true - -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_2agtf"] -filter_enabled = true -filters = ["Armature/Skeleton3D:Hips", "Armature/Skeleton3D:LeftFoot", "Armature/Skeleton3D:LeftLeg", "Armature/Skeleton3D:LeftToeBase", "Armature/Skeleton3D:LeftUpLeg", "Armature/Skeleton3D:RightFoot", "Armature/Skeleton3D:RightLeg", "Armature/Skeleton3D:RightToeBase", "Armature/Skeleton3D:RightUpLeg"] -sync = true - -[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_3twx3"] -sync = true -xfade_time = 0.3 -input_0/name = "stand" -input_0/auto_advance = false -input_0/reset = true -input_1/name = "crouch" -input_1/auto_advance = false -input_1/reset = true - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_id6x0"] -animation = &"CrouchIdle" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_cri6g"] -animation = &"CrouchWalkingForward" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_urt4k"] -advance_mode = 2 -advance_condition = &"idle" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_6juuf"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"walking" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_611fp"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"idle" - -[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_2xodt"] -states/CrouchIdle/node = SubResource("AnimationNodeAnimation_id6x0") -states/CrouchIdle/position = Vector2(321, 100) -states/CrouchWalkingForward/node = SubResource("AnimationNodeAnimation_cri6g") -states/CrouchWalkingForward/position = Vector2(560, 100) -states/Start/position = Vector2(157, 100) -transitions = ["Start", "CrouchIdle", SubResource("AnimationNodeStateMachineTransition_urt4k"), "CrouchIdle", "CrouchWalkingForward", SubResource("AnimationNodeStateMachineTransition_6juuf"), "CrouchWalkingForward", "CrouchIdle", SubResource("AnimationNodeStateMachineTransition_611fp")] - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_u8pjd"] -animation = &"Idle" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_4dxpj"] -animation = &"Jogbackward" - -[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_mk3d0"] -sync = true -xfade_time = 0.1 -input_0/name = "Forward" -input_0/auto_advance = false -input_0/reset = false -input_1/name = "Backward" -input_1/auto_advance = false -input_1/reset = false - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6bsh6"] -animation = &"JogForward" - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_r61ry"] -graph_offset = Vector2(-467, 62.6111) -nodes/Backward/node = SubResource("AnimationNodeAnimation_4dxpj") -nodes/Backward/position = Vector2(-100, 220) -nodes/FB/node = SubResource("AnimationNodeTransition_mk3d0") -nodes/FB/position = Vector2(140, 140) -nodes/Forward/node = SubResource("AnimationNodeAnimation_6bsh6") -nodes/Forward/position = Vector2(-100, 100) -node_connections = [&"output", 0, &"FB", &"FB", 0, &"Forward", &"FB", 1, &"Backward"] - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_pgipy"] -animation = &"Run" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_hwdqf"] -animation = &"RunToStop" - -[sub_resource type="AnimationNodeTimeSeek" id="AnimationNodeTimeSeek_3wh8r"] - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xw0ge"] -graph_offset = Vector2(-348.252, 95.8945) -nodes/StopAnim/node = SubResource("AnimationNodeAnimation_hwdqf") -nodes/StopAnim/position = Vector2(-260, 180) -nodes/StopSeek/node = SubResource("AnimationNodeTimeSeek_3wh8r") -nodes/StopSeek/position = Vector2(-60, 160) -node_connections = [&"output", 0, &"StopSeek", &"StopSeek", 0, &"StopAnim"] - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dxjg6"] -animation = &"WalkingBackward" - -[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_tyxgb"] -sync = true -xfade_time = 0.1 -input_0/name = "Forward" -input_0/auto_advance = false -input_0/reset = false -input_1/name = "Backward" -input_1/auto_advance = false -input_1/reset = false - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3y4dp"] -animation = &"Walk" - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_3e37y"] -graph_offset = Vector2(-388, 64) -nodes/Backward/node = SubResource("AnimationNodeAnimation_dxjg6") -nodes/Backward/position = Vector2(-100, 180) -nodes/FB/node = SubResource("AnimationNodeTransition_tyxgb") -nodes/FB/position = Vector2(140, 100) -nodes/Forward/node = SubResource("AnimationNodeAnimation_3y4dp") -nodes/Forward/position = Vector2(-60, 60) -node_connections = [&"output", 0, &"FB", &"FB", 0, &"Forward", &"FB", 1, &"Backward"] - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_wnbtw"] -xfade_time = 0.2 -switch_mode = 2 -advance_mode = 2 -advance_condition = &"idle" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rvsaa"] -advance_mode = 2 -advance_condition = &"stop" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_s0egl"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"sprinting" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_xf5i1"] -advance_mode = 2 -advance_condition = &"idle" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_nbs2g"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"walking" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rs3n0"] -advance_mode = 2 -advance_condition = &"stop" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_6gab4"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"running" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_6m5a2"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"walking" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_hy2h2"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"running" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_2tyel"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"sprinting" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7h1qf"] -advance_mode = 2 -advance_condition = &"stop" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4twgu"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"running" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_01wuf"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"walking" - -[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_ieguh"] -states/Idle/node = SubResource("AnimationNodeAnimation_u8pjd") -states/Idle/position = Vector2(137, 278) -states/Jog/node = SubResource("AnimationNodeBlendTree_r61ry") -states/Jog/position = Vector2(687.227, 134) -states/Run/node = SubResource("AnimationNodeAnimation_pgipy") -states/Run/position = Vector2(881, 296) -states/Start/position = Vector2(22, 278) -states/Stopping/node = SubResource("AnimationNodeBlendTree_xw0ge") -states/Stopping/position = Vector2(505, 327) -states/Walk/node = SubResource("AnimationNodeBlendTree_3e37y") -states/Walk/position = Vector2(216.227, 134) -transitions = ["Stopping", "Idle", SubResource("AnimationNodeStateMachineTransition_wnbtw"), "Run", "Stopping", SubResource("AnimationNodeStateMachineTransition_rvsaa"), "Idle", "Run", SubResource("AnimationNodeStateMachineTransition_s0egl"), "Start", "Idle", SubResource("AnimationNodeStateMachineTransition_xf5i1"), "Idle", "Walk", SubResource("AnimationNodeStateMachineTransition_nbs2g"), "Walk", "Stopping", SubResource("AnimationNodeStateMachineTransition_rs3n0"), "Walk", "Jog", SubResource("AnimationNodeStateMachineTransition_6gab4"), "Jog", "Walk", SubResource("AnimationNodeStateMachineTransition_6m5a2"), "Run", "Jog", SubResource("AnimationNodeStateMachineTransition_hy2h2"), "Jog", "Run", SubResource("AnimationNodeStateMachineTransition_2tyel"), "Jog", "Stopping", SubResource("AnimationNodeStateMachineTransition_7h1qf"), "Idle", "Jog", SubResource("AnimationNodeStateMachineTransition_4twgu"), "Run", "Walk", SubResource("AnimationNodeStateMachineTransition_01wuf")] -graph_offset = Vector2(23.227, 86) - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_ml0kl"] -graph_offset = Vector2(-384.513, 189.941) -nodes/crouch/node = SubResource("AnimationNodeTransition_3twx3") -nodes/crouch/position = Vector2(100, 180) -nodes/crouching/node = SubResource("AnimationNodeStateMachine_2xodt") -nodes/crouching/position = Vector2(-100, 420) -nodes/standing/node = SubResource("AnimationNodeStateMachine_ieguh") -nodes/standing/position = Vector2(-120, 40) -node_connections = [&"output", 0, &"crouch", &"crouch", 0, &"standing", &"crouch", 1, &"crouching"] - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_al4un"] -resource_local_to_scene = true -graph_offset = Vector2(158.168, 745) -nodes/AnimTurnLeft/node = SubResource("AnimationNodeAnimation_mb2kt") -nodes/AnimTurnLeft/position = Vector2(500, 1540) -nodes/AnimTurnRight/node = SubResource("AnimationNodeAnimation_2rfjg") -nodes/AnimTurnRight/position = Vector2(500, 1660) -nodes/FallAnimation/node = SubResource("AnimationNodeAnimation_v6381") -nodes/FallAnimation/position = Vector2(1060, 1600) -nodes/InAir/node = SubResource("AnimationNodeBlend2_nojly") -nodes/InAir/position = Vector2(1280, 1380) -nodes/RightOrLeft/node = SubResource("AnimationNodeBlend2_85ljr") -nodes/RightOrLeft/position = Vector2(720, 1560) -nodes/Turn/node = SubResource("AnimationNodeBlend2_2agtf") -nodes/Turn/position = Vector2(980, 1400) -nodes/VelocityDirection/node = SubResource("AnimationNodeBlendTree_ml0kl") -nodes/VelocityDirection/position = Vector2(680, 1400) -nodes/output/position = Vector2(1540, 1400) -node_connections = [&"output", 0, &"InAir", &"InAir", 0, &"Turn", &"InAir", 1, &"FallAnimation", &"RightOrLeft", 0, &"AnimTurnLeft", &"RightOrLeft", 1, &"AnimTurnRight", &"Turn", 0, &"VelocityDirection", &"Turn", 1, &"RightOrLeft"] - [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_70w0s"] resource_local_to_scene = true radius = 0.375 @@ -533,19 +288,19 @@ aim_standing_data = ExtResource("2_c4o7m") aim_crouch_data = ExtResource("3_p3fng") [node name="AnimationTree" parent="." node_paths=PackedStringArray("movement_script") instance=ExtResource("3_86f8p")] -tree_root = SubResource("AnimationNodeBlendTree_al4un") +tree_root = ExtResource("5_umod7") anim_player = NodePath("../AnimationPlayer") active = true -parameters/VelocityDirection/crouch/current_state = "" +parameters/VelocityDirection/crouch/current_state = "stand" parameters/VelocityDirection/crouch/transition_request = "" parameters/VelocityDirection/crouch/current_index = 0 parameters/VelocityDirection/standing/Jog/FB/current_state = "" -parameters/VelocityDirection/standing/Jog/FB/transition_request = "Forward" +parameters/VelocityDirection/standing/Jog/FB/transition_request = "" parameters/VelocityDirection/standing/Jog/FB/current_index = 0 parameters/VelocityDirection/standing/Stopping/StopSeek/seek_request = -1.0 -parameters/VelocityDirection/standing/Walk/FB/current_state = "" -parameters/VelocityDirection/standing/Walk/FB/transition_request = "Backward" -parameters/VelocityDirection/standing/Walk/FB/current_index = 0 +parameters/VelocityDirection/standing/Walk/FB/current_state = "Backward" +parameters/VelocityDirection/standing/Walk/FB/transition_request = "" +parameters/VelocityDirection/standing/Walk/FB/current_index = 1 movement_script = NodePath("../CharacterMovementComponent") [node name="CameraComponent" type="Node" parent="." node_paths=PackedStringArray("SpringArm", "Camera", "PlayerRef", "first_person_camera_bone")] @@ -566,43 +321,43 @@ bones/0/name = "Hips" bones/0/parent = -1 bones/0/rest = Transform3D(0.544576, -0.0348814, -0.837986, 0.0102475, 0.999337, -0.0349382, 0.838649, 0.0104393, 0.544573, -0.000172998, 0.901879, -0.00179914) bones/0/enabled = true -bones/0/position = Vector3(0.00402462, 0.931774, -0.00148197) -bones/0/rotation = Quaternion(-0.0410823, -0.36855, -0.0148637, 0.928581) +bones/0/position = Vector3(0.00422655, 0.931758, -0.00151068) +bones/0/rotation = Quaternion(-0.0410404, -0.368618, -0.0149358, 0.928555) bones/0/scale = Vector3(1, 1, 1) bones/1/name = "Spine" bones/1/parent = 0 bones/1/rest = Transform3D(0.99963, -0.0129189, 0.0239171, 0.01122, 0.997494, 0.0698543, -0.0247596, -0.0695601, 0.99727, 4.88944e-09, 0.0992349, -0.0122733) bones/1/enabled = true bones/1/position = Vector3(4.88944e-09, 0.0992349, -0.0122733) -bones/1/rotation = Quaternion(-0.0131557, 0.0402235, -0.00558345, 0.999089) +bones/1/rotation = Quaternion(-0.0132377, 0.0402317, -0.0055675, 0.999087) bones/1/scale = Vector3(1, 1, 1) bones/2/name = "Spine1" bones/2/parent = 1 bones/2/rest = Transform3D(0.99985, -0.015446, 0.00786788, 0.0155655, 0.999761, -0.0153596, -0.00762876, 0.0154798, 0.999851, -2.79397e-09, 0.11732, 1.86265e-09) bones/2/enabled = true bones/2/position = Vector3(-2.79397e-09, 0.11732, 1.86265e-09) -bones/2/rotation = Quaternion(0.0936958, 0.0816387, -0.00724576, 0.992222) +bones/2/rotation = Quaternion(0.0935209, 0.0816172, -0.00720795, 0.99224) bones/2/scale = Vector3(1, 1, 1) bones/3/name = "Spine2" bones/3/parent = 2 bones/3/rest = Transform3D(0.999844, -0.014346, 0.0103258, 0.0156141, 0.990645, -0.135571, -0.00828427, 0.135711, 0.990714, -2.79397e-09, 0.134588, -2.51457e-08) bones/3/enabled = true bones/3/position = Vector3(-2.79397e-09, 0.134588, -2.51457e-08) -bones/3/rotation = Quaternion(0.15362, 0.0811185, -0.0122637, 0.984718) +bones/3/rotation = Quaternion(0.153499, 0.0811155, -0.0122445, 0.984738) bones/3/scale = Vector3(1, 1, 1) bones/4/name = "Neck" bones/4/parent = 3 bones/4/rest = Transform3D(0.968778, 0.12654, 0.213204, -0.00181599, 0.863542, -0.504273, -0.247921, 0.488142, 0.836811, 2.48197e-07, 0.150325, 0.00792907) bones/4/enabled = true bones/4/position = Vector3(2.48197e-07, 0.150325, 0.00792907) -bones/4/rotation = Quaternion(0.133184, -0.0105116, 0.00305445, 0.991031) +bones/4/rotation = Quaternion(0.13395, -0.0104432, 0.00291895, 0.990929) bones/4/scale = Vector3(1, 1, 1) bones/5/name = "Head" bones/5/parent = 4 bones/5/rest = Transform3D(0.840773, 0.330252, 0.428993, -0.33245, 0.940342, -0.0723432, -0.427291, -0.0817944, 0.900406, 5.58794e-09, 0.107895, 5.21541e-08) bones/5/enabled = true bones/5/position = Vector3(5.58794e-09, 0.107895, 5.21541e-08) -bones/5/rotation = Quaternion(-0.0451848, 0.167787, -0.0585998, 0.983042) +bones/5/rotation = Quaternion(-0.0434388, 0.167911, -0.0585857, 0.983101) bones/5/scale = Vector3(1, 1, 1) bones/6/name = "HeadTop_End" bones/6/parent = 5 @@ -630,42 +385,42 @@ bones/9/parent = 3 bones/9/rest = Transform3D(-0.250988, 0.959361, -0.128958, 0.025503, -0.126623, -0.991623, -0.967654, -0.252174, 0.0073142, 0.0610582, 0.0911044, 0.00705553) bones/9/enabled = true bones/9/position = Vector3(0.0610582, 0.0911044, 0.00705553) -bones/9/rotation = Quaternion(-0.469871, -0.538903, 0.569029, -0.406216) +bones/9/rotation = Quaternion(-0.468483, -0.540141, 0.568859, -0.406412) bones/9/scale = Vector3(1, 1, 1) bones/10/name = "LeftArm" bones/10/parent = 9 bones/10/rest = Transform3D(0.845869, -0.51692, -0.131522, 0.093338, 0.386222, -0.917671, 0.52516, 0.763954, 0.374941, 7.45058e-09, 0.129223, 3.95812e-08) bones/10/enabled = true bones/10/position = Vector3(7.45058e-09, 0.129223, 3.95812e-08) -bones/10/rotation = Quaternion(0.536539, -0.0741386, 0.142452, 0.828454) +bones/10/rotation = Quaternion(0.536725, -0.0739729, 0.142349, 0.828367) bones/10/scale = Vector3(1, 1, 1) bones/11/name = "LeftForeArm" bones/11/parent = 10 bones/11/rest = Transform3D(0.138967, -0.989426, 0.0415226, 0.989436, 0.140472, 0.0358277, -0.0412816, 0.0361051, 0.998495, -4.47035e-08, 0.274229, -7.45058e-09) bones/11/enabled = true bones/11/position = Vector3(-4.47035e-08, 0.274229, -7.45058e-09) -bones/11/rotation = Quaternion(-0.00795068, 0.0985412, 0.453225, 0.885897) +bones/11/rotation = Quaternion(-0.00786828, 0.0988462, 0.453615, 0.885664) bones/11/scale = Vector3(1, 1, 1) bones/12/name = "LeftHand" bones/12/parent = 11 bones/12/rest = Transform3D(0.746359, -0.304314, 0.591895, 0.184003, 0.949028, 0.255908, -0.639601, -0.0820888, 0.764311, 6.0536e-09, 0.276326, -1.49012e-08) bones/12/enabled = true bones/12/position = Vector3(6.0536e-09, 0.276326, -1.49012e-08) -bones/12/rotation = Quaternion(-0.130447, 0.122497, -0.00648334, 0.983837) +bones/12/rotation = Quaternion(-0.135327, 0.122813, -0.00638225, 0.983139) bones/12/scale = Vector3(1, 1, 1) bones/13/name = "LeftHandMiddle1" bones/13/parent = 12 bones/13/rest = Transform3D(0.98654, 0.118644, -0.112532, -0.118809, 0.0472127, -0.991794, -0.112357, 0.991814, 0.0606732, -3.12924e-07, 0.127755, -7.63685e-08) bones/13/enabled = true bones/13/position = Vector3(-3.12924e-07, 0.127755, -7.63685e-08) -bones/13/rotation = Quaternion(0.138376, 0.00253176, -0.0681381, 0.98803) +bones/13/rotation = Quaternion(0.138766, 0.00244989, -0.0677588, 0.988002) bones/13/scale = Vector3(1, 1, 1) bones/14/name = "LeftHandMiddle2" bones/14/parent = 13 bones/14/rest = Transform3D(0.980685, 0.110739, -0.161229, -0.112737, -0.353585, -0.928584, -0.159838, 0.928824, -0.334271, -7.45058e-09, 0.0361397, -5.21541e-08) bones/14/enabled = true bones/14/position = Vector3(-7.45058e-09, 0.0361397, -5.21541e-08) -bones/14/rotation = Quaternion(0.203867, -0.0014049, 0.0159102, 0.978868) +bones/14/rotation = Quaternion(0.204167, -0.00140683, 0.0159439, 0.978805) bones/14/scale = Vector3(1, 1, 1) bones/15/name = "LeftHandMiddle3" bones/15/parent = 14 @@ -686,14 +441,14 @@ bones/17/parent = 12 bones/17/rest = Transform3D(0.922249, -0.296379, 0.248225, 0.374682, 0.843413, -0.385056, -0.0952333, 0.448123, 0.888885, -0.0300309, 0.0378879, 0.0216701) bones/17/enabled = true bones/17/position = Vector3(-0.0300309, 0.0378879, 0.0216701) -bones/17/rotation = Quaternion(0.286044, 0.117781, 0.176838, 0.934363) +bones/17/rotation = Quaternion(0.286222, 0.118061, 0.176242, 0.934386) bones/17/scale = Vector3(1, 1, 1) bones/18/name = "LeftHandThumb2" bones/18/parent = 17 bones/18/rest = Transform3D(0.793061, 0.491162, -0.360297, -0.562049, 0.818065, -0.121947, 0.234851, 0.299216, 0.924832, 1.19209e-07, 0.0474499, -2.44938e-07) bones/18/enabled = true bones/18/position = Vector3(1.19209e-07, 0.0474499, -2.44938e-07) -bones/18/rotation = Quaternion(-0.00757916, 0.00114365, -0.000678519, 0.99997) +bones/18/rotation = Quaternion(-0.00756044, 0.00113891, -0.000676865, 0.999971) bones/18/scale = Vector3(1, 1, 1) bones/19/name = "LeftHandThumb3" bones/19/parent = 18 @@ -714,14 +469,14 @@ bones/21/parent = 12 bones/21/rest = Transform3D(0.983723, 0.142189, -0.109869, -0.119058, 0.0577917, -0.991204, -0.134589, 0.988151, 0.0737798, -0.0282207, 0.122666, 0.00231682) bones/21/enabled = true bones/21/position = Vector3(-0.0282207, 0.122666, 0.00231682) -bones/21/rotation = Quaternion(0.04806, -0.00483958, 0.06252, 0.996874) +bones/21/rotation = Quaternion(0.0416862, -0.00524834, 0.0617776, 0.997205) bones/21/scale = Vector3(1, 1, 1) bones/22/name = "LeftHandIndex2" bones/22/parent = 21 bones/22/rest = Transform3D(0.978949, 0.10384, -0.175717, -0.111366, -0.44972, -0.8862, -0.171047, 0.887113, -0.428688, 1.11759e-07, 0.0389198, -5.96046e-08) bones/22/enabled = true bones/22/position = Vector3(1.11759e-07, 0.0389198, -5.96046e-08) -bones/22/rotation = Quaternion(0.16524, -0.00128247, -0.00409346, 0.986244) +bones/22/rotation = Quaternion(0.155026, -0.001031, -0.00536023, 0.987895) bones/22/scale = Vector3(1, 1, 1) bones/23/name = "LeftHandIndex3" bones/23/parent = 22 @@ -742,14 +497,14 @@ bones/25/parent = 12 bones/25/rest = Transform3D(0.991492, 0.0540781, -0.118406, -0.118263, -0.00584495, -0.992965, -0.0543897, 0.99852, 0.000600219, 0.0221662, 0.12147, -9.90927e-05) bones/25/enabled = true bones/25/position = Vector3(0.0221662, 0.12147, -9.90927e-05) -bones/25/rotation = Quaternion(0.278568, -0.0198514, -0.113642, 0.953463) +bones/25/rotation = Quaternion(0.279024, -0.0199859, -0.113273, 0.953371) bones/25/scale = Vector3(1, 1, 1) bones/26/name = "LeftHandRing2" bones/26/parent = 25 bones/26/rest = Transform3D(0.981497, 0.113181, -0.154445, -0.116659, -0.286137, -0.951061, -0.151835, 0.951481, -0.267639, -3.72529e-08, 0.036012, -1.11759e-07) bones/26/enabled = true bones/26/position = Vector3(-3.72529e-08, 0.036012, -1.11759e-07) -bones/26/rotation = Quaternion(0.28776, 0.00176866, 0.0251049, 0.957372) +bones/26/rotation = Quaternion(0.28795, 0.00177103, 0.0251162, 0.957314) bones/26/scale = Vector3(1, 1, 1) bones/27/name = "LeftHandRing3" bones/27/parent = 26 @@ -770,14 +525,14 @@ bones/29/parent = 12 bones/29/rest = Transform3D(0.991785, 0.0101279, -0.127516, -0.126197, -0.0855001, -0.988314, -0.0209122, 0.996287, -0.0835196, 0.0472581, 0.109082, 0.00226384) bones/29/enabled = true bones/29/position = Vector3(0.0472581, 0.109082, 0.00226384) -bones/29/rotation = Quaternion(0.303334, -0.02124, -0.147326, 0.941187) +bones/29/rotation = Quaternion(0.303509, -0.0213223, -0.147108, 0.941163) bones/29/scale = Vector3(1, 1, 1) bones/30/name = "LeftHandPinky2" bones/30/parent = 29 bones/30/rest = Transform3D(0.989305, 0.129006, -0.068066, -0.049097, -0.144898, -0.988228, -0.13735, 0.981001, -0.137015, -5.96046e-08, 0.0413669, -1.49012e-08) bones/30/enabled = true bones/30/position = Vector3(-5.96046e-08, 0.0413669, -1.49012e-08) -bones/30/rotation = Quaternion(0.348785, 0.0117774, 0.0500277, 0.935793) +bones/30/rotation = Quaternion(0.348871, 0.0117818, 0.0500284, 0.93576) bones/30/scale = Vector3(1, 1, 1) bones/31/name = "LeftHandPinky3" bones/31/parent = 30 @@ -798,42 +553,42 @@ bones/33/parent = 3 bones/33/rest = Transform3D(-0.214833, -0.949432, 0.228968, -0.0511495, -0.223182, -0.973434, 0.975311, -0.220837, -0.000616074, -0.061057, 0.0911053, 0.00705566) bones/33/enabled = true bones/33/position = Vector3(-0.061057, 0.0911053, 0.00705566) -bones/33/rotation = Quaternion(0.521331, -0.499599, 0.538313, 0.434551) +bones/33/rotation = Quaternion(0.519979, -0.500794, 0.538197, 0.434939) bones/33/scale = Vector3(1, 1, 1) bones/34/name = "RightArm" bones/34/parent = 33 bones/34/rest = Transform3D(0.555382, 0.714901, -0.424814, -0.786414, 0.285417, -0.547804, -0.270377, 0.63832, 0.720724, -2.23517e-08, 0.129223, 9.12696e-08) bones/34/enabled = true bones/34/position = Vector3(-2.23517e-08, 0.129223, 9.12696e-08) -bones/34/rotation = Quaternion(0.516601, 0.0809877, 0.0779658, 0.848814) +bones/34/rotation = Quaternion(0.516569, 0.0810343, 0.0782291, 0.848805) bones/34/scale = Vector3(1, 1, 1) bones/35/name = "RightForeArm" bones/35/parent = 34 bones/35/rest = Transform3D(-0.491194, 0.870247, -0.0374029, -0.870282, -0.488505, 0.0630281, 0.0365786, 0.0635101, 0.997311, 7.45058e-09, 0.274776, -3.72529e-08) bones/35/enabled = true bones/35/position = Vector3(7.45058e-09, 0.274776, -3.72529e-08) -bones/35/rotation = Quaternion(0.0632593, -0.0669544, -0.432373, 0.896978) +bones/35/rotation = Quaternion(0.0636331, -0.0676073, -0.432668, 0.89676) bones/35/scale = Vector3(1, 1, 1) bones/36/name = "RightHand" bones/36/parent = 35 bones/36/rest = Transform3D(0.953663, 0.121098, 0.275431, -0.18063, 0.962538, 0.202223, -0.240624, -0.242603, 0.939811, 7.45058e-09, 0.276868, 5.96046e-08) bones/36/enabled = true bones/36/position = Vector3(7.45058e-09, 0.276868, 5.96046e-08) -bones/36/rotation = Quaternion(0.114432, -0.00685497, -0.0569176, 0.991776) +bones/36/rotation = Quaternion(0.114004, -0.00635046, -0.0565906, 0.991847) bones/36/scale = Vector3(1, 1, 1) bones/37/name = "RightHandMiddle1" bones/37/parent = 36 bones/37/rest = Transform3D(0.986308, -0.119644, 0.1135, 0.119813, 0.0469439, -0.991686, 0.113321, 0.991706, 0.060636, 3.50177e-07, 0.127755, -8.9407e-08) bones/37/enabled = true bones/37/position = Vector3(3.50177e-07, 0.127755, -8.9407e-08) -bones/37/rotation = Quaternion(0.110453, 0.00839263, 0.025189, 0.993527) +bones/37/rotation = Quaternion(0.110449, 0.00839253, 0.0251882, 0.993527) bones/37/scale = Vector3(1, 1, 1) bones/38/name = "RightHandMiddle2" bones/38/parent = 37 bones/38/rest = Transform3D(0.980361, -0.111685, 0.162538, 0.114835, -0.346749, -0.930902, 0.160328, 0.931285, -0.327114, 6.70552e-08, 0.0361398, -1.02445e-07) bones/38/enabled = true bones/38/position = Vector3(6.70552e-08, 0.0361398, -1.02445e-07) -bones/38/rotation = Quaternion(0.312071, 0.00172795, -0.021518, 0.949813) +bones/38/rotation = Quaternion(0.31208, 0.00172976, -0.0215201, 0.949811) bones/38/scale = Vector3(1, 1, 1) bones/39/name = "RightHandMiddle3" bones/39/parent = 38 @@ -854,14 +609,14 @@ bones/41/parent = 36 bones/41/rest = Transform3D(0.940404, 0.29207, -0.174168, -0.340048, 0.811489, -0.475239, 0.00253238, 0.506143, 0.862446, 0.0300309, 0.037888, 0.0216703) bones/41/enabled = true bones/41/position = Vector3(0.0300309, 0.037888, 0.0216703) -bones/41/rotation = Quaternion(0.203277, 0.0246177, -0.227956, 0.951897) +bones/41/rotation = Quaternion(0.203187, 0.0246775, -0.227694, 0.951978) bones/41/scale = Vector3(1, 1, 1) bones/42/name = "RightHandThumb2" bones/42/parent = 41 bones/42/rest = Transform3D(0.793791, -0.608189, -0.00159446, 0.595053, 0.777184, -0.204689, 0.125729, 0.161531, 0.978826, -1.2666e-07, 0.0474498, -2.68221e-07) bones/42/enabled = true bones/42/position = Vector3(-1.2666e-07, 0.0474498, -2.68221e-07) -bones/42/rotation = Quaternion(0.00549, 0.00171916, 0.181817, 0.983316) +bones/42/rotation = Quaternion(0.00560333, 0.00174091, 0.182157, 0.983252) bones/42/scale = Vector3(1, 1, 1) bones/43/name = "RightHandThumb3" bones/43/parent = 42 @@ -882,14 +637,14 @@ bones/45/parent = 36 bones/45/rest = Transform3D(0.978763, -0.172845, 0.110213, 0.120904, 0.0525683, -0.991271, 0.165542, 0.983545, 0.0723496, 0.0282207, 0.122666, 0.00231693) bones/45/enabled = true bones/45/position = Vector3(0.0282207, 0.122666, 0.00231693) -bones/45/rotation = Quaternion(0.0425193, 0.0101111, 0.0085639, 0.999008) +bones/45/rotation = Quaternion(0.0439411, 0.0101255, 0.00842995, 0.998947) bones/45/scale = Vector3(1, 1, 1) bones/46/name = "RightHandIndex2" bones/46/parent = 45 bones/46/rest = Transform3D(0.978593, -0.104714, 0.177172, 0.106914, -0.476935, -0.872412, 0.175853, 0.872679, -0.45553, 1.49012e-07, 0.0389196, -8.75443e-08) bones/46/enabled = true bones/46/position = Vector3(1.49012e-07, 0.0389196, -8.75443e-08) -bones/46/rotation = Quaternion(0.15479, 0.000351027, 0.00890259, 0.987907) +bones/46/rotation = Quaternion(0.158943, 0.000454471, 0.00847928, 0.987251) bones/46/scale = Vector3(1, 1, 1) bones/47/name = "RightHandIndex3" bones/47/parent = 46 @@ -910,14 +665,14 @@ bones/49/parent = 36 bones/49/rest = Transform3D(0.991829, -0.0281871, 0.124419, 0.122843, -0.0520322, -0.991061, 0.0344089, 0.998247, -0.0481446, -0.0221661, 0.12147, -9.89214e-05) bones/49/enabled = true bones/49/position = Vector3(-0.0221661, 0.12147, -9.89214e-05) -bones/49/rotation = Quaternion(0.21178, -0.00637652, 0.0651235, 0.975124) +bones/49/rotation = Quaternion(0.211856, -0.00636768, 0.0651173, 0.975108) bones/49/scale = Vector3(1, 1, 1) bones/50/name = "RightHandRing2" bones/50/parent = 49 bones/50/rest = Transform3D(0.982662, -0.117406, 0.143498, 0.122607, -0.169092, -0.977944, 0.139081, 0.978583, -0.151765, -7.45058e-09, 0.036012, 0) bones/50/enabled = true bones/50/position = Vector3(-7.45058e-09, 0.036012, 0) -bones/50/rotation = Quaternion(0.344337, -0.00251833, -0.036222, 0.938144) +bones/50/rotation = Quaternion(0.344477, -0.00252074, -0.0362343, 0.938092) bones/50/scale = Vector3(1, 1, 1) bones/51/name = "RightHandRing3" bones/51/parent = 50 @@ -938,14 +693,14 @@ bones/53/parent = 36 bones/53/rest = Transform3D(0.989897, 0.0602255, 0.128364, 0.133612, -0.0931972, -0.986642, -0.0474579, 0.993824, -0.100302, -0.047258, 0.109082, 0.00226358) bones/53/enabled = true bones/53/position = Vector3(-0.047258, 0.109082, 0.00226358) -bones/53/rotation = Quaternion(0.208181, -0.0111381, 0.09168, 0.97372) +bones/53/rotation = Quaternion(0.208164, -0.011138, 0.0916826, 0.973724) bones/53/scale = Vector3(1, 1, 1) bones/54/name = "RightHandPinky2" bones/54/parent = 53 bones/54/rest = Transform3D(0.983236, -0.118306, 0.138749, 0.122507, -0.134994, -0.983244, 0.135054, 0.983758, -0.118237, -2.98023e-08, 0.0413665, 4.24334e-08) bones/54/enabled = true bones/54/position = Vector3(-2.98023e-08, 0.0413665, 4.24334e-08) -bones/54/rotation = Quaternion(0.383203, -0.0137233, -0.0712344, 0.920811) +bones/54/rotation = Quaternion(0.371842, -0.0132128, -0.0705199, 0.925519) bones/54/scale = Vector3(1, 1, 1) bones/55/name = "RightHandPinky3" bones/55/parent = 54 @@ -966,28 +721,28 @@ bones/57/parent = 0 bones/57/rest = Transform3D(-0.919821, -0.336213, -0.202214, 0.264978, -0.912457, 0.311783, -0.289337, 0.233202, 0.928386, -0.0912445, -0.0665637, -0.000553781) bones/57/enabled = true bones/57/position = Vector3(-0.0912445, -0.0665637, -0.000553781) -bones/57/rotation = Quaternion(-0.124959, 0.00723949, 0.983424, 0.131188) +bones/57/rotation = Quaternion(-0.124964, 0.00699268, 0.983418, 0.131243) bones/57/scale = Vector3(1, 1, 1) bones/58/name = "RightLeg" bones/58/parent = 57 bones/58/rest = Transform3D(0.997811, 0.0392429, -0.0532304, 0.00932048, 0.713425, 0.70067, 0.0654722, -0.699632, 0.711497, 4.84288e-08, 0.405994, 2.6077e-08) bones/58/enabled = true bones/58/position = Vector3(4.84288e-08, 0.405994, 2.6077e-08) -bones/58/rotation = Quaternion(-0.285819, 0.0730622, -0.0181253, 0.955323) +bones/58/rotation = Quaternion(-0.285454, 0.072971, -0.0180631, 0.95544) bones/58/scale = Vector3(1, 1, 1) bones/59/name = "RightFoot" bones/59/parent = 58 bones/59/rest = Transform3D(0.96994, -0.122934, 0.210008, 0.229929, 0.180407, -0.95634, 0.0796801, 0.975879, 0.20325, -1.02445e-08, 0.42099, 9.31323e-09) bones/59/enabled = true bones/59/position = Vector3(-1.02445e-08, 0.42099, 9.31323e-09) -bones/59/rotation = Quaternion(0.591757, 0.0615614, 0.113903, 0.795651) +bones/59/rotation = Quaternion(0.591604, 0.0615746, 0.113919, 0.795761) bones/59/scale = Vector3(1, 1, 1) bones/60/name = "RightToeBase" bones/60/parent = 59 bones/60/rest = Transform3D(0.999367, 6.43255e-05, 0.0355612, 0.0227211, 0.768109, -0.639916, -0.027356, 0.640319, 0.767622, -5.51563e-09, 0.16432, -1.09159e-07) bones/60/enabled = true bones/60/position = Vector3(-5.51563e-09, 0.16432, -1.09159e-07) -bones/60/rotation = Quaternion(0.354084, 0.0198933, 0.00424706, 0.934993) +bones/60/rotation = Quaternion(0.354084, 0.0199009, 0.00424348, 0.934992) bones/60/scale = Vector3(1, 1, 1) bones/61/name = "RightToe_End" bones/61/parent = 60 @@ -1001,28 +756,28 @@ bones/62/parent = 0 bones/62/rest = Transform3D(-0.893651, 0.403296, 0.196826, -0.227377, -0.785047, 0.576195, 0.386895, 0.470164, 0.793258, 0.0912445, -0.0665636, -0.000553777) bones/62/enabled = true bones/62/position = Vector3(0.0912445, -0.0665636, -0.000553777) -bones/62/rotation = Quaternion(0.0798582, 0.206126, 0.969783, -0.103228) +bones/62/rotation = Quaternion(0.0798621, 0.206014, 0.969814, -0.103155) bones/62/scale = Vector3(1, 1, 1) bones/63/name = "LeftLeg" bones/63/parent = 62 bones/63/rest = Transform3D(0.99576, 0.0029921, 0.0919402, -0.056273, 0.810456, 0.583091, -0.0727688, -0.585792, 0.807188, 5.12227e-08, 0.405994, -2.04891e-08) bones/63/enabled = true bones/63/position = Vector3(5.12227e-08, 0.405994, -2.04891e-08) -bones/63/rotation = Quaternion(-0.30451, 0.120695, -0.0382038, 0.944059) +bones/63/rotation = Quaternion(-0.304405, 0.120591, -0.0381307, 0.944109) bones/63/scale = Vector3(1, 1, 1) bones/64/name = "LeftFoot" bones/64/parent = 63 bones/64/rest = Transform3D(0.977802, 0.128039, -0.165856, -0.209522, 0.59104, -0.778956, -0.00170929, 0.796415, 0.604748, -2.04891e-08, 0.42099, 6.98492e-09) bones/64/enabled = true bones/64/position = Vector3(-2.04891e-08, 0.42099, 6.98492e-09) -bones/64/rotation = Quaternion(0.486589, -0.0212348, -0.038252, 0.872535) +bones/64/rotation = Quaternion(0.486562, -0.0211853, -0.0381588, 0.872555) bones/64/scale = Vector3(1, 1, 1) bones/65/name = "LeftToeBase" bones/65/parent = 64 bones/65/rest = Transform3D(0.999367, -0.000945242, -0.0355486, -0.0227206, 0.752033, -0.658734, 0.0273564, 0.659125, 0.751536, 3.66616e-08, 0.16432, -1.10293e-07) bones/65/enabled = true bones/65/position = Vector3(3.66616e-08, 0.16432, -1.10293e-07) -bones/65/rotation = Quaternion(0.35833, 0.000179993, -0.0290177, 0.933144) +bones/65/rotation = Quaternion(0.358297, 0.000280556, -0.0290093, 0.933157) bones/65/scale = Vector3(1, 1, 1) bones/66/name = "LeftToe_End" bones/66/parent = 65 @@ -1041,7 +796,7 @@ mesh = ExtResource("6_e2l25") skin = SubResource("Skin_hh536") [node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D"] -transform = Transform3D(0.997001, -0.0757629, 0.0157468, 0.0725891, 0.845176, -0.529536, 0.0268105, 0.529092, 0.848141, -0.0150566, 1.50121, 0.109839) +transform = Transform3D(0.996948, -0.0763166, 0.0164762, 0.0733299, 0.842824, -0.53317, 0.0268031, 0.532751, 0.845848, -0.0147349, 1.50118, 0.109773) bone_name = "Head" bone_idx = 5 diff --git a/AMSG_Examples/Player/Player.tscn b/AMSG_Examples/Player/Player.tscn index bbc75a4..5f33f62 100644 --- a/AMSG_Examples/Player/Player.tscn +++ b/AMSG_Examples/Player/Player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=53 format=3 uid="uid://c2l3xxr5mfm6w"] +[gd_scene load_steps=11 format=3 uid="uid://c2l3xxr5mfm6w"] [ext_resource type="PackedScene" uid="uid://cth47yn1duvdh" path="res://AMSG_Examples/Character/mixamo_character.tscn" id="1_ihvpu"] [ext_resource type="PackedScene" uid="uid://bfkejs88xm680" path="res://addons/PoseWarping/MotionWarping.tscn" id="2_0jifq"] @@ -10,252 +10,6 @@ [ext_resource type="Texture2D" uid="uid://ijv6wr22hov8" path="res://AMSG_Examples/Player/UI/Debug/direction.png" id="8_t071y"] [ext_resource type="Texture2D" uid="uid://ck5riwbh478s4" path="res://AMSG_Examples/Player/UI/Debug/velocity.png" id="9_464xm"] -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_mb2kt"] -animation = &"TurnLeft" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_2rfjg"] -animation = &"TurnRight" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_v6381"] -animation = &"Falling" - -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_nojly"] -sync = true - -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_85ljr"] -sync = true - -[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_2agtf"] -filter_enabled = true -filters = ["Armature/Skeleton3D:Hips", "Armature/Skeleton3D:LeftFoot", "Armature/Skeleton3D:LeftLeg", "Armature/Skeleton3D:LeftToeBase", "Armature/Skeleton3D:LeftUpLeg", "Armature/Skeleton3D:RightFoot", "Armature/Skeleton3D:RightLeg", "Armature/Skeleton3D:RightToeBase", "Armature/Skeleton3D:RightUpLeg"] -sync = true - -[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_3twx3"] -sync = true -xfade_time = 0.3 -input_0/name = "stand" -input_0/auto_advance = false -input_0/reset = true -input_1/name = "crouch" -input_1/auto_advance = false -input_1/reset = true - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_id6x0"] -animation = &"CrouchIdle" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_cri6g"] -animation = &"CrouchWalkingForward" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_urt4k"] -advance_mode = 2 -advance_condition = &"idle" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_6juuf"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"walking" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_611fp"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"idle" - -[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_2xodt"] -states/CrouchIdle/node = SubResource("AnimationNodeAnimation_id6x0") -states/CrouchIdle/position = Vector2(321, 100) -states/CrouchWalkingForward/node = SubResource("AnimationNodeAnimation_cri6g") -states/CrouchWalkingForward/position = Vector2(560, 100) -states/Start/position = Vector2(157, 100) -transitions = ["Start", "CrouchIdle", SubResource("AnimationNodeStateMachineTransition_urt4k"), "CrouchIdle", "CrouchWalkingForward", SubResource("AnimationNodeStateMachineTransition_6juuf"), "CrouchWalkingForward", "CrouchIdle", SubResource("AnimationNodeStateMachineTransition_611fp")] - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_u8pjd"] -animation = &"Idle" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_4dxpj"] -animation = &"Jogbackward" - -[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_mk3d0"] -sync = true -xfade_time = 0.1 -input_0/name = "Forward" -input_0/auto_advance = false -input_0/reset = false -input_1/name = "Backward" -input_1/auto_advance = false -input_1/reset = false - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6bsh6"] -animation = &"JogForward" - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_r61ry"] -graph_offset = Vector2(-467, 62.6111) -nodes/Backward/node = SubResource("AnimationNodeAnimation_4dxpj") -nodes/Backward/position = Vector2(-100, 220) -nodes/FB/node = SubResource("AnimationNodeTransition_mk3d0") -nodes/FB/position = Vector2(140, 140) -nodes/Forward/node = SubResource("AnimationNodeAnimation_6bsh6") -nodes/Forward/position = Vector2(-100, 100) -node_connections = [&"output", 0, &"FB", &"FB", 0, &"Forward", &"FB", 1, &"Backward"] - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_pgipy"] -animation = &"Run" - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_hwdqf"] -animation = &"RunToStop" - -[sub_resource type="AnimationNodeTimeSeek" id="AnimationNodeTimeSeek_3wh8r"] - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_xw0ge"] -graph_offset = Vector2(-348.252, 95.8945) -nodes/StopAnim/node = SubResource("AnimationNodeAnimation_hwdqf") -nodes/StopAnim/position = Vector2(-260, 180) -nodes/StopSeek/node = SubResource("AnimationNodeTimeSeek_3wh8r") -nodes/StopSeek/position = Vector2(-60, 160) -node_connections = [&"output", 0, &"StopSeek", &"StopSeek", 0, &"StopAnim"] - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dxjg6"] -animation = &"WalkingBackward" - -[sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_tyxgb"] -sync = true -xfade_time = 0.1 -input_0/name = "Forward" -input_0/auto_advance = false -input_0/reset = false -input_1/name = "Backward" -input_1/auto_advance = false -input_1/reset = false - -[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3y4dp"] -animation = &"Walk" - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_3e37y"] -graph_offset = Vector2(-388, 64) -nodes/Backward/node = SubResource("AnimationNodeAnimation_dxjg6") -nodes/Backward/position = Vector2(-100, 180) -nodes/FB/node = SubResource("AnimationNodeTransition_tyxgb") -nodes/FB/position = Vector2(140, 100) -nodes/Forward/node = SubResource("AnimationNodeAnimation_3y4dp") -nodes/Forward/position = Vector2(-60, 60) -node_connections = [&"output", 0, &"FB", &"FB", 0, &"Forward", &"FB", 1, &"Backward"] - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_wnbtw"] -xfade_time = 0.2 -switch_mode = 2 -advance_mode = 2 -advance_condition = &"idle" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rvsaa"] -advance_mode = 2 -advance_condition = &"stop" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_s0egl"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"sprinting" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_xf5i1"] -advance_mode = 2 -advance_condition = &"idle" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_nbs2g"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"walking" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rs3n0"] -advance_mode = 2 -advance_condition = &"stop" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_6gab4"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"running" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_6m5a2"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"walking" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_hy2h2"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"running" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_2tyel"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"sprinting" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_7h1qf"] -advance_mode = 2 -advance_condition = &"stop" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4twgu"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"running" - -[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_01wuf"] -xfade_time = 0.2 -switch_mode = 1 -advance_mode = 2 -advance_condition = &"walking" - -[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_ieguh"] -states/Idle/node = SubResource("AnimationNodeAnimation_u8pjd") -states/Idle/position = Vector2(137, 278) -states/Jog/node = SubResource("AnimationNodeBlendTree_r61ry") -states/Jog/position = Vector2(687.227, 134) -states/Run/node = SubResource("AnimationNodeAnimation_pgipy") -states/Run/position = Vector2(881, 296) -states/Start/position = Vector2(22, 278) -states/Stopping/node = SubResource("AnimationNodeBlendTree_xw0ge") -states/Stopping/position = Vector2(505, 327) -states/Walk/node = SubResource("AnimationNodeBlendTree_3e37y") -states/Walk/position = Vector2(216.227, 134) -transitions = ["Stopping", "Idle", SubResource("AnimationNodeStateMachineTransition_wnbtw"), "Run", "Stopping", SubResource("AnimationNodeStateMachineTransition_rvsaa"), "Idle", "Run", SubResource("AnimationNodeStateMachineTransition_s0egl"), "Start", "Idle", SubResource("AnimationNodeStateMachineTransition_xf5i1"), "Idle", "Walk", SubResource("AnimationNodeStateMachineTransition_nbs2g"), "Walk", "Stopping", SubResource("AnimationNodeStateMachineTransition_rs3n0"), "Walk", "Jog", SubResource("AnimationNodeStateMachineTransition_6gab4"), "Jog", "Walk", SubResource("AnimationNodeStateMachineTransition_6m5a2"), "Run", "Jog", SubResource("AnimationNodeStateMachineTransition_hy2h2"), "Jog", "Run", SubResource("AnimationNodeStateMachineTransition_2tyel"), "Jog", "Stopping", SubResource("AnimationNodeStateMachineTransition_7h1qf"), "Idle", "Jog", SubResource("AnimationNodeStateMachineTransition_4twgu"), "Run", "Walk", SubResource("AnimationNodeStateMachineTransition_01wuf")] -graph_offset = Vector2(23.227, 86) - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_ml0kl"] -graph_offset = Vector2(-452.287, 249.667) -nodes/crouch/node = SubResource("AnimationNodeTransition_3twx3") -nodes/crouch/position = Vector2(100, 180) -nodes/crouching/node = SubResource("AnimationNodeStateMachine_2xodt") -nodes/crouching/position = Vector2(-100, 420) -nodes/standing/node = SubResource("AnimationNodeStateMachine_ieguh") -nodes/standing/position = Vector2(-120, 40) -node_connections = [&"output", 0, &"crouch", &"crouch", 0, &"standing", &"crouch", 1, &"crouching"] - -[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_8li6f"] -resource_local_to_scene = true -graph_offset = Vector2(404, 1378) -nodes/AnimTurnLeft/node = SubResource("AnimationNodeAnimation_mb2kt") -nodes/AnimTurnLeft/position = Vector2(500, 1540) -nodes/AnimTurnRight/node = SubResource("AnimationNodeAnimation_2rfjg") -nodes/AnimTurnRight/position = Vector2(500, 1660) -nodes/FallAnimation/node = SubResource("AnimationNodeAnimation_v6381") -nodes/FallAnimation/position = Vector2(1060, 1600) -nodes/InAir/node = SubResource("AnimationNodeBlend2_nojly") -nodes/InAir/position = Vector2(1280, 1380) -nodes/RightOrLeft/node = SubResource("AnimationNodeBlend2_85ljr") -nodes/RightOrLeft/position = Vector2(720, 1560) -nodes/Turn/node = SubResource("AnimationNodeBlend2_2agtf") -nodes/Turn/position = Vector2(980, 1400) -nodes/VelocityDirection/node = SubResource("AnimationNodeBlendTree_ml0kl") -nodes/VelocityDirection/position = Vector2(680, 1400) -nodes/output/position = Vector2(1540, 1400) -node_connections = [&"output", 0, &"InAir", &"InAir", 0, &"Turn", &"InAir", 1, &"FallAnimation", &"RightOrLeft", 0, &"AnimTurnLeft", &"RightOrLeft", 1, &"AnimTurnRight", &"Turn", 0, &"VelocityDirection", &"Turn", 1, &"RightOrLeft"] - [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jrjkm"] resource_local_to_scene = true radius = 0.375 @@ -281,10 +35,7 @@ deacceleration = 5.0 character_movement_component = NodePath("../CharacterMovementComponent") [node name="AnimationTree" parent="." index="4"] -tree_root = SubResource("AnimationNodeBlendTree_8li6f") -parameters/VelocityDirection/crouch/current_state = "stand" parameters/VelocityDirection/crouching/conditions/idle = true -parameters/VelocityDirection/standing/Jog/FB/transition_request = "" parameters/VelocityDirection/standing/Walk/FB/transition_request = "Forward" [node name="CameraComponent" parent="." index="5" node_paths=PackedStringArray("networking")] @@ -294,52 +45,52 @@ networking = NodePath("../Networking") shape = SubResource("CapsuleShape3D_jrjkm") [node name="Skeleton3D" parent="Armature" index="0"] -bones/0/position = Vector3(0.00514283, 0.927846, -0.00900684) -bones/0/rotation = Quaternion(-0.0375471, -0.369129, -0.0142244, 0.92851) -bones/1/rotation = Quaternion(-0.0116818, 0.0402553, -0.00597738, 0.999103) -bones/2/rotation = Quaternion(0.100366, 0.0818837, -0.00884231, 0.991536) -bones/3/rotation = Quaternion(0.159428, 0.0811472, -0.0136609, 0.983774) -bones/4/rotation = Quaternion(0.111447, -0.0107125, 0.00271822, 0.993709) -bones/5/rotation = Quaternion(-0.0272892, 0.162744, -0.0691996, 0.98386) -bones/9/rotation = Quaternion(-0.497283, -0.513568, 0.573014, -0.400764) -bones/10/rotation = Quaternion(0.518042, -0.0863918, 0.142342, 0.838992) -bones/11/rotation = Quaternion(-0.0136785, 0.0901374, 0.439332, 0.893687) -bones/12/rotation = Quaternion(-0.159946, 0.124633, -0.00599625, 0.979208) -bones/13/rotation = Quaternion(0.124958, 0.00598863, -0.0855298, 0.98845) -bones/14/rotation = Quaternion(0.190326, -0.00131213, 0.0143977, 0.981615) -bones/17/rotation = Quaternion(0.287113, 0.113107, 0.188492, 0.932333) -bones/18/rotation = Quaternion(-0.00723377, 0.00105577, -0.000647955, 0.999973) -bones/21/rotation = Quaternion(0.0369378, -0.00638831, 0.0608377, 0.997443) -bones/22/rotation = Quaternion(0.143996, -0.000756167, -0.0067242, 0.989555) -bones/25/rotation = Quaternion(0.265914, -0.0133959, -0.13053, 0.955025) -bones/26/rotation = Quaternion(0.275727, 0.00167923, 0.0243811, 0.960925) -bones/29/rotation = Quaternion(0.291072, -0.0142481, -0.162967, 0.942611) -bones/30/rotation = Quaternion(0.336719, 0.0112254, 0.0499041, 0.940215) -bones/33/rotation = Quaternion(0.546606, -0.476047, 0.539943, 0.427858) -bones/34/rotation = Quaternion(0.506191, 0.0939411, 0.0780195, 0.853732) -bones/35/rotation = Quaternion(0.0504176, -0.0398973, -0.425829, 0.902517) -bones/36/rotation = Quaternion(0.0993632, -0.0215324, -0.0561618, 0.993232) -bones/37/rotation = Quaternion(0.110894, 0.00842611, 0.0251277, 0.993479) -bones/38/rotation = Quaternion(0.263565, 0.00139789, -0.0170528, 0.96449) -bones/41/rotation = Quaternion(0.202921, 0.0247937, -0.227104, 0.952172) -bones/42/rotation = Quaternion(0.00561147, 0.00162301, 0.182829, 0.983127) -bones/45/rotation = Quaternion(0.0401629, 0.0101544, 0.00857677, 0.999105) -bones/46/rotation = Quaternion(0.146479, 0.000140026, 0.0097461, 0.989166) -bones/49/rotation = Quaternion(0.187553, -0.0085316, 0.067473, 0.979897) -bones/50/rotation = Quaternion(0.318942, -0.00229456, -0.0340785, 0.947159) -bones/53/rotation = Quaternion(0.207867, -0.0111356, 0.0917275, 0.973783) -bones/54/rotation = Quaternion(0.349194, -0.0121965, -0.0690675, 0.934422) -bones/57/rotation = Quaternion(-0.124183, 0.0284147, 0.983466, 0.128711) -bones/58/rotation = Quaternion(-0.310645, 0.0714006, -0.0193444, 0.947643) -bones/59/rotation = Quaternion(0.598892, 0.0606747, 0.111679, 0.79068) -bones/60/rotation = Quaternion(0.354095, 0.0200344, 0.00418106, 0.934986) -bones/62/rotation = Quaternion(0.0778524, 0.21867, 0.966869, -0.106243) -bones/63/rotation = Quaternion(-0.311255, 0.119719, -0.0385963, 0.941965) -bones/64/rotation = Quaternion(0.485532, -0.0225506, -0.0409369, 0.872969) -bones/65/rotation = Quaternion(0.357982, 0.00122692, -0.0289052, 0.93328) +bones/0/position = Vector3(0.00307154, 0.928953, -0.00582457) +bones/0/rotation = Quaternion(-0.0386993, -0.366073, -0.0142908, 0.929671) +bones/1/rotation = Quaternion(-0.0116714, 0.04029, -0.0057005, 0.999104) +bones/2/rotation = Quaternion(0.0980348, 0.081894, -0.00782757, 0.991777) +bones/3/rotation = Quaternion(0.157698, 0.081268, -0.0127739, 0.984055) +bones/4/rotation = Quaternion(0.123096, -0.010575, 0.00329749, 0.992333) +bones/5/rotation = Quaternion(-0.0147247, 0.165176, -0.0612685, 0.984249) +bones/9/rotation = Quaternion(-0.485798, -0.52436, 0.571291, -0.403328) +bones/10/rotation = Quaternion(0.525329, -0.0825893, 0.145434, 0.834301) +bones/11/rotation = Quaternion(-0.0117784, 0.0919917, 0.442605, 0.891908) +bones/12/rotation = Quaternion(-0.139281, 0.123052, -0.0067517, 0.982554) +bones/13/rotation = Quaternion(0.129791, 0.0049255, -0.0797705, 0.988315) +bones/14/rotation = Quaternion(0.194611, -0.00134958, 0.0148765, 0.980767) +bones/17/rotation = Quaternion(0.285767, 0.113375, 0.186401, 0.933134) +bones/18/rotation = Quaternion(-0.00675782, 0.000708122, -0.0010769, 0.999976) +bones/21/rotation = Quaternion(0.0372783, -0.00592194, 0.0613149, 0.997405) +bones/22/rotation = Quaternion(0.150281, -0.000912868, -0.00594733, 0.988625) +bones/25/rotation = Quaternion(0.270133, -0.0154711, -0.124667, 0.954593) +bones/26/rotation = Quaternion(0.280285, 0.00171968, 0.0246549, 0.959599) +bones/29/rotation = Quaternion(0.295985, -0.0165164, -0.158116, 0.94187) +bones/30/rotation = Quaternion(0.340817, 0.0114166, 0.049947, 0.938733) +bones/33/rotation = Quaternion(0.537037, -0.485327, 0.539384, 0.430248) +bones/34/rotation = Quaternion(0.515389, 0.0856115, 0.0778204, 0.849111) +bones/35/rotation = Quaternion(0.0570445, -0.0545271, -0.429099, 0.899804) +bones/36/rotation = Quaternion(0.0975776, -0.0162615, -0.0623905, 0.993137) +bones/37/rotation = Quaternion(0.111481, 0.00858334, 0.0244412, 0.993429) +bones/38/rotation = Quaternion(0.260572, 0.00137098, -0.0167742, 0.965308) +bones/41/rotation = Quaternion(0.204032, 0.0218675, -0.220974, 0.953448) +bones/42/rotation = Quaternion(0.00605184, 0.00176486, 0.191557, 0.981461) +bones/45/rotation = Quaternion(0.0371088, 0.00975306, 0.00973316, 0.999216) +bones/46/rotation = Quaternion(0.146375, 0.000130638, 0.00975682, 0.989181) +bones/49/rotation = Quaternion(0.186047, -0.00864637, 0.0675207, 0.98018) +bones/50/rotation = Quaternion(0.319276, -0.00235549, -0.034099, 0.947045) +bones/53/rotation = Quaternion(0.207435, -0.0111392, 0.0919199, 0.973857) +bones/54/rotation = Quaternion(0.347901, -0.0121543, -0.0689811, 0.934911) +bones/57/rotation = Quaternion(-0.124737, 0.0189461, 0.983592, 0.128955) +bones/58/rotation = Quaternion(-0.30174, 0.0746472, -0.0195312, 0.950263) +bones/59/rotation = Quaternion(0.597066, 0.0614299, 0.113325, 0.791767) +bones/60/rotation = Quaternion(0.354139, 0.0205856, 0.00392327, 0.934958) +bones/62/rotation = Quaternion(0.077489, 0.214755, 0.967932, -0.1048) +bones/63/rotation = Quaternion(-0.310596, 0.121541, -0.0384712, 0.941954) +bones/64/rotation = Quaternion(0.487328, -0.0219852, -0.0397632, 0.872036) +bones/65/rotation = Quaternion(0.358486, 0.00101861, -0.0289189, 0.933087) [node name="BoneAttachment3D" parent="Armature/Skeleton3D" index="2"] -transform = Transform3D(0.998335, -0.0568945, 0.00953034, 0.0525525, 0.828842, -0.557009, 0.0237915, 0.556582, 0.830452, -0.0176521, 1.49537, 0.110767) +transform = Transform3D(0.996503, -0.0793487, 0.0261786, 0.0797027, 0.808651, -0.582864, 0.0250801, 0.582912, 0.812148, -0.0190087, 1.49646, 0.112044) [node name="flashlight" parent="Armature" index="1" instance=ExtResource("5_euvsl")] transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1.12407, 0.156779) diff --git a/addons/AMSG/Components/AnimationBlend.gd b/addons/AMSG/Components/AnimationBlend.gd index e729a28..7e5720c 100644 --- a/addons/AMSG/Components/AnimationBlend.gd +++ b/addons/AMSG/Components/AnimationBlend.gd @@ -18,18 +18,25 @@ func _physics_process(_delta): pass Global.movement_state.ragdoll: pass + + #standing + set("parameters/VelocityDirection/standing/conditions/idle",!movement_script.input_is_moving) + set("parameters/VelocityDirection/standing/conditions/walking",movement_script.gait == Global.gait.walking and movement_script.input_is_moving) + set("parameters/VelocityDirection/standing/conditions/running",movement_script.gait == Global.gait.running and movement_script.input_is_moving) + set("parameters/VelocityDirection/standing/conditions/sprinting",movement_script.gait == Global.gait.sprinting and movement_script.input_is_moving) + + # Crouching + set("parameters/VelocityDirection/crouching/conditions/idle",!movement_script.input_is_moving) + set("parameters/VelocityDirection/crouching/conditions/walking",movement_script.gait == Global.gait.walking and movement_script.input_is_moving) #Couch/stand switch match movement_script.stance: Global.stance.standing: set("parameters/VelocityDirection/crouch/transition_request" , "stand") Global.stance.crouching: + set("parameters/VelocityDirection/crouch/transition_request" , "crouch") - #standing - set("parameters/VelocityDirection/standing/conditions/idle",!movement_script.input_is_moving) - set("parameters/VelocityDirection/standing/conditions/walking",movement_script.gait == Global.gait.walking and movement_script.input_is_moving) - set("parameters/VelocityDirection/standing/conditions/running",movement_script.gait == Global.gait.running and movement_script.input_is_moving) - set("parameters/VelocityDirection/standing/conditions/sprinting",movement_script.gait == Global.gait.sprinting and movement_script.input_is_moving) + if movement_script.rotation_mode == Global.rotation_mode.looking_direction or movement_script.rotation_mode == Global.rotation_mode.aiming: @@ -43,9 +50,6 @@ func _physics_process(_delta): else: set("parameters/VelocityDirection/standing/Walk/FB/transition_request","Forward") set("parameters/VelocityDirection/standing/Jog/FB/transition_request","Forward") - # Crouching - set("parameters/VelocityDirection/crouching/conditions/idle",!movement_script.input_is_moving) - set("parameters/VelocityDirection/crouching/conditions/walking",movement_script.gait == Global.gait.walking and movement_script.input_is_moving) #On Stopped if !(Input.is_action_pressed("forward") || Input.is_action_pressed("back") || Input.is_action_pressed("right") || Input.is_action_pressed("left")) and (Input.is_action_just_released("right") || Input.is_action_just_released("back") || Input.is_action_just_released("left") || Input.is_action_just_released("forward")): diff --git a/addons/AMSG/Components/AnimationTreeBlendTree.tres b/addons/AMSG/Components/AnimationTreeBlendTree.tres index e5bc548..2373691 100644 --- a/addons/AMSG/Components/AnimationTreeBlendTree.tres +++ b/addons/AMSG/Components/AnimationTreeBlendTree.tres @@ -1,4 +1,4 @@ -[gd_resource type="AnimationNodeBlendTree" load_steps=41 format=3 uid="uid://vjkfv8poa6di"] +[gd_resource type="AnimationNodeBlendTree" load_steps=42 format=3 uid="uid://vjkfv8poa6di"] [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_mb2kt"] animation = &"TurnLeft" @@ -22,12 +22,13 @@ sync = true [sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_3twx3"] sync = true -enabled_inputs = 2 xfade_time = 0.3 input_0/name = "stand" input_0/auto_advance = false +input_0/reset = true input_1/name = "crouch" input_1/auto_advance = false +input_1/reset = true [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_id6x0"] animation = &"CrouchIdle" @@ -36,15 +37,19 @@ animation = &"CrouchIdle" animation = &"CrouchWalkingForward" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_urt4k"] +switch_mode = 1 +advance_mode = 2 [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_6juuf"] xfade_time = 0.2 switch_mode = 1 +advance_mode = 2 advance_condition = &"walking" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_611fp"] xfade_time = 0.2 switch_mode = 1 +advance_mode = 2 advance_condition = &"idle" [sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_2xodt"] @@ -52,7 +57,7 @@ states/CrouchIdle/node = SubResource("AnimationNodeAnimation_id6x0") states/CrouchIdle/position = Vector2(321, 100) states/CrouchWalkingForward/node = SubResource("AnimationNodeAnimation_cri6g") states/CrouchWalkingForward/position = Vector2(560, 100) -states/Start/position = Vector2(157, 100) +states/Start/position = Vector2(169, 183) transitions = ["Start", "CrouchIdle", SubResource("AnimationNodeStateMachineTransition_urt4k"), "CrouchIdle", "CrouchWalkingForward", SubResource("AnimationNodeStateMachineTransition_6juuf"), "CrouchWalkingForward", "CrouchIdle", SubResource("AnimationNodeStateMachineTransition_611fp")] [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_u8pjd"] @@ -62,11 +67,14 @@ animation = &"Idle" animation = &"Jogbackward" [sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_mk3d0"] -enabled_inputs = 2 +sync = true +xfade_time = 0.1 input_0/name = "Forward" input_0/auto_advance = false +input_0/reset = false input_1/name = "Backward" input_1/auto_advance = false +input_1/reset = false [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6bsh6"] animation = &"JogForward" @@ -101,11 +109,14 @@ node_connections = [&"output", 0, &"StopSeek", &"StopSeek", 0, &"StopAnim"] animation = &"WalkingBackward" [sub_resource type="AnimationNodeTransition" id="AnimationNodeTransition_tyxgb"] -enabled_inputs = 2 +sync = true +xfade_time = 0.1 input_0/name = "Forward" input_0/auto_advance = false +input_0/reset = false input_1/name = "Backward" input_1/auto_advance = false +input_1/reset = false [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3y4dp"] animation = &"Walk" @@ -138,7 +149,6 @@ advance_condition = &"sprinting" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_xf5i1"] advance_mode = 2 -advance_condition = &"idle" [sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_nbs2g"] xfade_time = 0.2 @@ -184,6 +194,12 @@ switch_mode = 1 advance_mode = 2 advance_condition = &"running" +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_01wuf"] +xfade_time = 0.2 +switch_mode = 1 +advance_mode = 2 +advance_condition = &"walking" + [sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_ieguh"] states/Idle/node = SubResource("AnimationNodeAnimation_u8pjd") states/Idle/position = Vector2(137, 278) @@ -196,22 +212,22 @@ states/Stopping/node = SubResource("AnimationNodeBlendTree_xw0ge") states/Stopping/position = Vector2(505, 327) states/Walk/node = SubResource("AnimationNodeBlendTree_3e37y") states/Walk/position = Vector2(216.227, 134) -transitions = ["Stopping", "Idle", SubResource("AnimationNodeStateMachineTransition_wnbtw"), "Run", "Stopping", SubResource("AnimationNodeStateMachineTransition_rvsaa"), "Idle", "Run", SubResource("AnimationNodeStateMachineTransition_s0egl"), "Start", "Idle", SubResource("AnimationNodeStateMachineTransition_xf5i1"), "Idle", "Walk", SubResource("AnimationNodeStateMachineTransition_nbs2g"), "Walk", "Stopping", SubResource("AnimationNodeStateMachineTransition_rs3n0"), "Walk", "Jog", SubResource("AnimationNodeStateMachineTransition_6gab4"), "Jog", "Walk", SubResource("AnimationNodeStateMachineTransition_6m5a2"), "Run", "Jog", SubResource("AnimationNodeStateMachineTransition_hy2h2"), "Jog", "Run", SubResource("AnimationNodeStateMachineTransition_2tyel"), "Jog", "Stopping", SubResource("AnimationNodeStateMachineTransition_7h1qf"), "Idle", "Jog", SubResource("AnimationNodeStateMachineTransition_4twgu")] -graph_offset = Vector2(-45.773, 131) +transitions = ["Stopping", "Idle", SubResource("AnimationNodeStateMachineTransition_wnbtw"), "Run", "Stopping", SubResource("AnimationNodeStateMachineTransition_rvsaa"), "Idle", "Run", SubResource("AnimationNodeStateMachineTransition_s0egl"), "Start", "Idle", SubResource("AnimationNodeStateMachineTransition_xf5i1"), "Idle", "Walk", SubResource("AnimationNodeStateMachineTransition_nbs2g"), "Walk", "Stopping", SubResource("AnimationNodeStateMachineTransition_rs3n0"), "Walk", "Jog", SubResource("AnimationNodeStateMachineTransition_6gab4"), "Jog", "Walk", SubResource("AnimationNodeStateMachineTransition_6m5a2"), "Run", "Jog", SubResource("AnimationNodeStateMachineTransition_hy2h2"), "Jog", "Run", SubResource("AnimationNodeStateMachineTransition_2tyel"), "Jog", "Stopping", SubResource("AnimationNodeStateMachineTransition_7h1qf"), "Idle", "Jog", SubResource("AnimationNodeStateMachineTransition_4twgu"), "Run", "Walk", SubResource("AnimationNodeStateMachineTransition_01wuf")] +graph_offset = Vector2(23.227, 86) [sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_ml0kl"] -graph_offset = Vector2(-337.513, 379.941) +graph_offset = Vector2(-240.871, 43.0034) nodes/crouch/node = SubResource("AnimationNodeTransition_3twx3") nodes/crouch/position = Vector2(100, 180) nodes/crouching/node = SubResource("AnimationNodeStateMachine_2xodt") -nodes/crouching/position = Vector2(-100, 420) +nodes/crouching/position = Vector2(-120, 320) nodes/standing/node = SubResource("AnimationNodeStateMachine_ieguh") nodes/standing/position = Vector2(-120, 40) node_connections = [&"output", 0, &"crouch", &"crouch", 0, &"standing", &"crouch", 1, &"crouching"] [resource] resource_local_to_scene = true -graph_offset = Vector2(304.5, 1160) +graph_offset = Vector2(290.475, 913.145) nodes/AnimTurnLeft/node = SubResource("AnimationNodeAnimation_mb2kt") nodes/AnimTurnLeft/position = Vector2(500, 1540) nodes/AnimTurnRight/node = SubResource("AnimationNodeAnimation_2rfjg")