summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2024-04-16 11:08:04 +0800
committerchai <215380520@qq.com>2024-04-16 11:08:04 +0800
commit80983c575ec565078f757f638f3726708647080a (patch)
tree14cad7cf19d4670ecfba3f371e49540e0042155c
parent0464810f2f83c86560c3422d664380d474cb3e56 (diff)
*misc
-rw-r--r--ActiveRagdoll/Assets/TABG/Materials/default_material.mat12
-rw-r--r--ActiveRagdoll/Assets/TABG/Prefabs/human_rigging.prefab596
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs12
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Animation.meta8
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Animation/AnimationObject.cs153
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Animation/AnimationObject.cs.meta11
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Animation/DragHandler.cs33
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Animation/DragHandler.cs.meta11
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Animation/PhysicsAnimation.cs43
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Animation/PhysicsAnimation.cs.meta11
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Animation/StartRotation.cs26
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Animation/StartRotation.cs.meta11
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Data/AnimationHandler.cs4
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Data/SetAnimationByInput.cs4
-rw-r--r--ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs2
-rw-r--r--ActiveRagdoll/Assets/TABG/Test.unity63
16 files changed, 915 insertions, 85 deletions
diff --git a/ActiveRagdoll/Assets/TABG/Materials/default_material.mat b/ActiveRagdoll/Assets/TABG/Materials/default_material.mat
index 15e6e7e..6fce466 100644
--- a/ActiveRagdoll/Assets/TABG/Materials/default_material.mat
+++ b/ActiveRagdoll/Assets/TABG/Materials/default_material.mat
@@ -10,11 +10,13 @@ Material:
m_Name: default_material
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ValidKeywords:
+ - _ALPHAPREMULTIPLY_ON
+ - _RECEIVE_SHADOWS_OFF
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
- m_DoubleSidedGI: 0
+ m_DoubleSidedGI: 1
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
@@ -83,11 +85,11 @@ Material:
m_Ints: []
m_Floats:
- _AlphaClip: 0
- - _Blend: 0
+ - _Blend: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- - _Cull: 2
+ - _Cull: 0
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
@@ -100,11 +102,11 @@ Material:
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- - _ReceiveShadows: 1
+ - _ReceiveShadows: 0
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- - _SrcBlend: 5
+ - _SrcBlend: 1
- _Surface: 1
- _WorkflowMode: 1
- _ZWrite: 0
diff --git a/ActiveRagdoll/Assets/TABG/Prefabs/human_rigging.prefab b/ActiveRagdoll/Assets/TABG/Prefabs/human_rigging.prefab
index 6bbf404..f82db40 100644
--- a/ActiveRagdoll/Assets/TABG/Prefabs/human_rigging.prefab
+++ b/ActiveRagdoll/Assets/TABG/Prefabs/human_rigging.prefab
@@ -1093,6 +1093,7 @@ GameObject:
- component: {fileID: 83600686717150900}
- component: {fileID: 732440393331709508}
- component: {fileID: 9141217467644992819}
+ - component: {fileID: 1549273962}
m_Layer: 6
m_Name: Rigging_Data
m_TagString: Untagged
@@ -1127,7 +1128,15 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0152a635e0b8d6547a566f7d1d7f34f8, type: 3}
m_Name:
m_EditorClassIdentifier:
- animationStates: []
+ animationStates:
+ - theInt: 0
+ theString: Stand
+ - theInt: 1
+ theString: Run
+ - theInt: 2
+ theString: Sprint
+ - theInt: 3
+ theString: Jump
animationState: 0
--- !u!114 &8431171258552371941
MonoBehaviour:
@@ -1165,6 +1174,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4cacc0017abb9f54b81913df2d2f00d5, type: 3}
m_Name:
m_EditorClassIdentifier:
+ rotationTarget: {fileID: 4068544631671626976}
--- !u!114 &2081091539071076239
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1239,6 +1249,18 @@ MonoBehaviour:
m_EditorClassIdentifier:
strength: 1
lookStrenth: 1
+--- !u!114 &1549273962
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1808858621}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: a7459e71d3133e747833a399f4895b51, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
--- !u!1 &2047997612
GameObject:
m_ObjectHideFlags: 0
@@ -1349,6 +1371,9 @@ GameObject:
- component: {fileID: 5009314273586098502}
- component: {fileID: 6122181118401514977}
- component: {fileID: 6122181118401514978}
+ - component: {fileID: 6122181118401514979}
+ - component: {fileID: 6122181118401514980}
+ - component: {fileID: 6122181118401514981}
m_Layer: 6
m_Name: Foot_L
m_TagString: Untagged
@@ -1513,6 +1538,56 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &6122181118401514979
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 352791520568127773}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 1f7b7bd465add9742bc770683eb2f98f, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ animations: []
+ smoothing: 0
+ multiplier: 1
+ isLeft: 0
+ switchToForwardEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ switchToBackwardsEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ dontAnimateIfHoldingSomething: 0
+--- !u!114 &6122181118401514980
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 352791520568127773}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &6122181118401514981
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 352791520568127773}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &360952041233165414
GameObject:
m_ObjectHideFlags: 0
@@ -1602,6 +1677,9 @@ GameObject:
- component: {fileID: 6775429611816846059}
- component: {fileID: 2783424386060882345}
- component: {fileID: 2783424386060882346}
+ - component: {fileID: 2783424386060882347}
+ - component: {fileID: 2783424386060882348}
+ - component: {fileID: 2783424386060882349}
m_Layer: 6
m_Name: Foot_R
m_TagString: Untagged
@@ -1766,6 +1844,56 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &2783424386060882347
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 700432527443861042}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 1f7b7bd465add9742bc770683eb2f98f, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ animations: []
+ smoothing: 0
+ multiplier: 1
+ isLeft: 0
+ switchToForwardEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ switchToBackwardsEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ dontAnimateIfHoldingSomething: 0
+--- !u!114 &2783424386060882348
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 700432527443861042}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &2783424386060882349
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 700432527443861042}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &1198478719857577481
GameObject:
m_ObjectHideFlags: 0
@@ -1779,6 +1907,8 @@ GameObject:
- component: {fileID: 3494091916137669429}
- component: {fileID: 4878685260469331850}
- component: {fileID: 4878685260469331851}
+ - component: {fileID: 4878685260469331852}
+ - component: {fileID: 4878685260469331853}
m_Layer: 6
m_Name: Hand_L
m_TagString: Untagged
@@ -1943,6 +2073,33 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &4878685260469331852
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1198478719857577481}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &4878685260469331853
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1198478719857577481}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &1254990767818926415
GameObject:
m_ObjectHideFlags: 0
@@ -2060,6 +2217,8 @@ GameObject:
- component: {fileID: 7601374539345087183}
- component: {fileID: 7163679047628771627}
- component: {fileID: 7163679047628771628}
+ - component: {fileID: 7163679047628771629}
+ - component: {fileID: 7163679047628771630}
m_Layer: 6
m_Name: Torso
m_TagString: Untagged
@@ -2224,6 +2383,33 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &7163679047628771629
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1625621794700460608}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &7163679047628771630
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1625621794700460608}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &2047971321291531494
GameObject:
m_ObjectHideFlags: 0
@@ -2317,7 +2503,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 3e4f01fcb88b28040a13a524b623a670, type: 3}
m_Name:
m_EditorClassIdentifier:
+ inputMovementDirection: {x: 0, y: 0, z: 0}
+ lastInputDirection: {x: 0, y: 0, z: 0}
allowStrafe: 1
+ isSpringting: 0
--- !u!1 &2132482246703060397
GameObject:
m_ObjectHideFlags: 0
@@ -2431,6 +2620,8 @@ GameObject:
- component: {fileID: 7066289305757245630}
- component: {fileID: 6887620786272290105}
- component: {fileID: 6887620786272290106}
+ - component: {fileID: 6887620786272290107}
+ - component: {fileID: 6887620786272290108}
m_Layer: 6
m_Name: Hip
m_TagString: Untagged
@@ -2499,6 +2690,33 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &6887620786272290107
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2282374011074668424}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &6887620786272290108
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2282374011074668424}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &2411311702239281492
GameObject:
m_ObjectHideFlags: 0
@@ -2512,6 +2730,8 @@ GameObject:
- component: {fileID: 3629881010665375168}
- component: {fileID: 5216378010582810223}
- component: {fileID: 5216378010582810224}
+ - component: {fileID: 5216378010582810225}
+ - component: {fileID: 5216378010582810226}
m_Layer: 6
m_Name: Hand_R
m_TagString: Untagged
@@ -2676,6 +2896,33 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &5216378010582810225
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2411311702239281492}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &5216378010582810226
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2411311702239281492}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &2474110595537587005
GameObject:
m_ObjectHideFlags: 0
@@ -2689,6 +2936,9 @@ GameObject:
- component: {fileID: 7237636587702004398}
- component: {fileID: 8750515621544498665}
- component: {fileID: 8750515621544498666}
+ - component: {fileID: 8750515621544498667}
+ - component: {fileID: 8750515621544498668}
+ - component: {fileID: 8750515621544498669}
m_Layer: 6
m_Name: Knee_R
m_TagString: Untagged
@@ -2853,6 +3103,56 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &8750515621544498667
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2474110595537587005}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 1f7b7bd465add9742bc770683eb2f98f, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ animations: []
+ smoothing: 0
+ multiplier: 1
+ isLeft: 0
+ switchToForwardEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ switchToBackwardsEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ dontAnimateIfHoldingSomething: 0
+--- !u!114 &8750515621544498668
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2474110595537587005}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &8750515621544498669
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2474110595537587005}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &2581325547809608687
GameObject:
m_ObjectHideFlags: 0
@@ -3170,6 +3470,9 @@ GameObject:
- component: {fileID: 1295959916615711177}
- component: {fileID: 4321150989774212267}
- component: {fileID: 4321150989774212268}
+ - component: {fileID: 4321150989774212269}
+ - component: {fileID: 4321150989774212270}
+ - component: {fileID: 4321150989774212271}
m_Layer: 6
m_Name: Knee_L
m_TagString: Untagged
@@ -3334,6 +3637,56 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &4321150989774212269
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4879437031530356264}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 1f7b7bd465add9742bc770683eb2f98f, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ animations: []
+ smoothing: 0
+ multiplier: 1
+ isLeft: 0
+ switchToForwardEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ switchToBackwardsEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ dontAnimateIfHoldingSomething: 0
+--- !u!114 &4321150989774212270
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4879437031530356264}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &4321150989774212271
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 4879437031530356264}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &5459608688684196573
GameObject:
m_ObjectHideFlags: 0
@@ -3393,6 +3746,9 @@ GameObject:
- component: {fileID: 1657485011335605418}
- component: {fileID: 3526346404085441776}
- component: {fileID: 3526346404085441777}
+ - component: {fileID: 3526346404085441778}
+ - component: {fileID: 3526346404085441779}
+ - component: {fileID: 3526346404085441780}
m_Layer: 6
m_Name: Arm_R
m_TagString: Untagged
@@ -3557,6 +3913,56 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &3526346404085441778
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5658401667225277159}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 1f7b7bd465add9742bc770683eb2f98f, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ animations: []
+ smoothing: 0
+ multiplier: 1
+ isLeft: 0
+ switchToForwardEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ switchToBackwardsEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ dontAnimateIfHoldingSomething: 0
+--- !u!114 &3526346404085441779
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5658401667225277159}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &3526346404085441780
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5658401667225277159}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &5992969589425681271
GameObject:
m_ObjectHideFlags: 0
@@ -3570,6 +3976,9 @@ GameObject:
- component: {fileID: 1267741373379440053}
- component: {fileID: 7057859769783231885}
- component: {fileID: 7057859769783231886}
+ - component: {fileID: 7057859769783231887}
+ - component: {fileID: 7057859769783231888}
+ - component: {fileID: 7057859769783231889}
m_Layer: 6
m_Name: Leg_R
m_TagString: Untagged
@@ -3733,6 +4142,56 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5e168c0b2976ea8459edfe49fecabfb9, type: 3}
m_Name:
m_EditorClassIdentifier:
+--- !u!114 &7057859769783231887
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5992969589425681271}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 1f7b7bd465add9742bc770683eb2f98f, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ animations: []
+ smoothing: 0
+ multiplier: 1
+ isLeft: 0
+ switchToForwardEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ switchToBackwardsEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ dontAnimateIfHoldingSomething: 0
+--- !u!114 &7057859769783231888
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5992969589425681271}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &7057859769783231889
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 5992969589425681271}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &6309941073781425405
GameObject:
m_ObjectHideFlags: 0
@@ -3746,6 +4205,9 @@ GameObject:
- component: {fileID: 7089674069800452097}
- component: {fileID: 8659986707249222523}
- component: {fileID: 8659986707249222524}
+ - component: {fileID: 8659986707249222525}
+ - component: {fileID: 8659986707249222526}
+ - component: {fileID: 8659986707249222527}
m_Layer: 6
m_Name: Leg_L
m_TagString: Untagged
@@ -3910,6 +4372,56 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &8659986707249222525
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 6309941073781425405}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 1f7b7bd465add9742bc770683eb2f98f, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ animations: []
+ smoothing: 0
+ multiplier: 1
+ isLeft: 0
+ switchToForwardEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ switchToBackwardsEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ dontAnimateIfHoldingSomething: 0
+--- !u!114 &8659986707249222526
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 6309941073781425405}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &8659986707249222527
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 6309941073781425405}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &7242023275942804698
GameObject:
m_ObjectHideFlags: 0
@@ -3954,6 +4466,9 @@ GameObject:
- component: {fileID: 1323609233965017470}
- component: {fileID: 2037636450122013951}
- component: {fileID: 2037636450122013952}
+ - component: {fileID: 2037636450122013953}
+ - component: {fileID: 2037636450122013954}
+ - component: {fileID: 2037636450122013955}
m_Layer: 6
m_Name: Arm_L
m_TagString: Untagged
@@ -4118,6 +4633,56 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &2037636450122013953
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7307037826757058977}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 1f7b7bd465add9742bc770683eb2f98f, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ animations: []
+ smoothing: 0
+ multiplier: 1
+ isLeft: 0
+ switchToForwardEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ switchToBackwardsEvent:
+ m_PersistentCalls:
+ m_Calls: []
+ dontAnimateIfHoldingSomething: 0
+--- !u!114 &2037636450122013954
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7307037826757058977}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &2037636450122013955
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7307037826757058977}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &7540932285142806653
GameObject:
m_ObjectHideFlags: 0
@@ -4130,6 +4695,8 @@ GameObject:
- component: {fileID: 5028902801156152278}
- component: {fileID: 4598979980058915679}
- component: {fileID: 5240332616388624507}
+ - component: {fileID: 5240332616388624508}
+ - component: {fileID: 5240332616388624509}
m_Layer: 6
m_Name: Head
m_TagString: Untagged
@@ -4277,6 +4844,33 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
+--- !u!114 &5240332616388624508
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7540932285142806653}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 955e6a7dcac3f0f4c84ea79136fddc01, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ startRotation: {x: 0, y: 0, z: 0, w: 0}
+ startRotationLocal: {x: 0, y: 0, z: 0, w: 0}
+--- !u!114 &5240332616388624509
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7540932285142806653}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4c70169cb02b3a440ac55da69e72be2d, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ dragAmount: 1
--- !u!1 &7628504463291864053
GameObject:
m_ObjectHideFlags: 0
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs b/ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs
index 47de9de..781e998 100644
--- a/ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Action/Movement.cs
@@ -7,17 +7,7 @@ namespace Rigging.Action
public class Movement : RiggingActionBase
{
- // Start is called before the first frame update
- void Start()
- {
-
- }
-
- // Update is called once per frame
- void Update()
- {
-
- }
+
}
} \ No newline at end of file
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Animation.meta b/ActiveRagdoll/Assets/TABG/Scripts/Animation.meta
new file mode 100644
index 0000000..c84ea3c
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Animation.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e6f95a4760ae6e34cab133aee596a3c6
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Animation/AnimationObject.cs b/ActiveRagdoll/Assets/TABG/Scripts/Animation/AnimationObject.cs
new file mode 100644
index 0000000..9e9039f
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Animation/AnimationObject.cs
@@ -0,0 +1,153 @@
+using Rigging.Data;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Events;
+
+namespace Rigging.Animations
+{
+
+ // 物理控制的动作
+ public class AnimationObject : MonoBehaviour
+ {
+
+ public PhysicsAnimation[] animations;
+
+ private Rigidbody rig;
+
+ private StepHandler stepHandler;
+
+ private Transform hip;
+
+ public float smoothing;
+
+ public float multiplier = 1f;
+
+ private bool isCurrentlyLeft;
+
+ public bool isLeft;
+
+ public UnityEvent switchToForwardEvent;
+
+ public UnityEvent switchToBackwardsEvent;
+
+ public bool dontAnimateIfHoldingSomething;
+
+ //private Holding holding;
+
+ private AnimationHandler animationHandler;
+
+ //private PlayerDeath death;
+
+ private float muscleMultiplier = 1f;
+
+ private void Start()
+ {
+ animationHandler = base.transform.root.GetComponent<AnimationHandler>();
+ rig = GetComponent<Rigidbody>();
+ stepHandler = base.transform.root.GetComponent<StepHandler>();
+ //holding = base.transform.root.GetComponent<Holding>();
+ //death = base.transform.root.GetComponent<PlayerDeath>();
+ Hip componentInChildren = base.transform.root.GetComponentInChildren<Hip>();
+ if ((bool)componentInChildren)
+ {
+ hip = componentInChildren.transform;
+ }
+ }
+
+ private void FixedUpdate()
+ {
+ //if ((bool)death)
+ //{
+ // if (death.muscleFunction < 0f)
+ // {
+ // return;
+ // }
+ // muscleMultiplier = death.muscleFunction;
+ //}
+ //if ((!holding || !dontAnimateIfHoldingSomething || !holding.heldObject) && animationHandler.animationState < animations.Length)
+ //{
+ // SetMultiplier();
+ // AddTorque();
+ // AddForce();
+ //}
+ SetMultiplier();
+ AddTorque();
+ AddForce();
+ }
+
+ private void AddForce()
+ {
+ Vector3 vector = Vector3.zero;
+ if (isCurrentlyLeft == isLeft)
+ {
+ Vector3 forwardForce = animations[animationHandler.animationState].forwardForce;
+ if (animations[animationHandler.animationState].forceSpace == PhysicsAnimation.ForceSpace.World)
+ {
+ vector = forwardForce;
+ }
+ if (animations[animationHandler.animationState].forceSpace == PhysicsAnimation.ForceSpace.Hip)
+ {
+ vector = hip.TransformDirection(forwardForce);
+ }
+ }
+ else
+ {
+ Vector3 backwardsForce = animations[animationHandler.animationState].backwardsForce;
+ if (animations[animationHandler.animationState].forceSpace == PhysicsAnimation.ForceSpace.World)
+ {
+ vector = backwardsForce;
+ }
+ if (animations[animationHandler.animationState].forceSpace == PhysicsAnimation.ForceSpace.Hip)
+ {
+ vector = hip.TransformDirection(backwardsForce);
+ }
+ }
+ rig.AddForce(vector * muscleMultiplier * multiplier, ForceMode.Acceleration);
+ }
+
+ private void AddTorque()
+ {
+ Vector3 vector = ((isCurrentlyLeft != isLeft) ? hip.TransformDirection(animations[animationHandler.animationState].backwardsTorque) : hip.TransformDirection(animations[animationHandler.animationState].forwardTorque));
+ rig.AddTorque(vector * muscleMultiplier * multiplier, ForceMode.Acceleration);
+ }
+
+ private void SetMultiplier()
+ {
+ if (smoothing != 0f)
+ {
+ float b = 1f;
+ if (isCurrentlyLeft != stepHandler.isLeft)
+ {
+ b = 0f;
+ }
+ multiplier = Mathf.Lerp(multiplier, b, 1f / smoothing);
+ if (multiplier < 0.1f)
+ {
+ ChangeStep();
+ }
+ }
+ else
+ {
+ ChangeStep();
+ }
+ }
+
+ private void ChangeStep()
+ {
+ if (isCurrentlyLeft != stepHandler.isLeft)
+ {
+ if (stepHandler.isLeft == isLeft)
+ {
+ switchToForwardEvent.Invoke();
+ }
+ else
+ {
+ switchToBackwardsEvent.Invoke();
+ }
+ isCurrentlyLeft = stepHandler.isLeft;
+ }
+ }
+ }
+
+}
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Animation/AnimationObject.cs.meta b/ActiveRagdoll/Assets/TABG/Scripts/Animation/AnimationObject.cs.meta
new file mode 100644
index 0000000..36fa9ba
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Animation/AnimationObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1f7b7bd465add9742bc770683eb2f98f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Animation/DragHandler.cs b/ActiveRagdoll/Assets/TABG/Scripts/Animation/DragHandler.cs
new file mode 100644
index 0000000..7528f57
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Animation/DragHandler.cs
@@ -0,0 +1,33 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Rigging.Animations
+{
+
+ public class DragHandler : MonoBehaviour
+ {
+
+ private float drag;
+
+ private float angularDrag;
+
+ private Rigidbody rig;
+
+ public float dragAmount = 1f;
+
+ private void Start()
+ {
+ rig = GetComponent<Rigidbody>();
+ drag = rig.drag;
+ angularDrag = rig.angularDrag;
+ }
+
+ private void Update()
+ {
+ rig.drag = drag * dragAmount;
+ rig.angularDrag = angularDrag * dragAmount;
+ }
+ }
+
+}
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Animation/DragHandler.cs.meta b/ActiveRagdoll/Assets/TABG/Scripts/Animation/DragHandler.cs.meta
new file mode 100644
index 0000000..a7afaa0
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Animation/DragHandler.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4c70169cb02b3a440ac55da69e72be2d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Animation/PhysicsAnimation.cs b/ActiveRagdoll/Assets/TABG/Scripts/Animation/PhysicsAnimation.cs
new file mode 100644
index 0000000..b0521c9
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Animation/PhysicsAnimation.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Rigging.Animations
+{
+ [Serializable]
+ public class PhysicsAnimation
+ {
+ public enum TorqueSpace
+ {
+ World,
+ Local,
+ Parent,
+ Hip
+ }
+
+ public enum ForceSpace
+ {
+ World,
+ Local,
+ Parent,
+ Hip
+ }
+
+ [Header("TORQUES")]
+ public Vector3 forwardTorque;
+
+ public Vector3 backwardsTorque;
+
+ public TorqueSpace torqueSpace;
+
+ [Header("FORCES")]
+ public Vector3 forwardForce;
+
+ public Vector3 backwardsForce;
+
+ public ForceSpace forceSpace;
+ }
+
+
+}
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Animation/PhysicsAnimation.cs.meta b/ActiveRagdoll/Assets/TABG/Scripts/Animation/PhysicsAnimation.cs.meta
new file mode 100644
index 0000000..113878e
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Animation/PhysicsAnimation.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3ec401472b5871a448f2b4212447cb38
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Animation/StartRotation.cs b/ActiveRagdoll/Assets/TABG/Scripts/Animation/StartRotation.cs
new file mode 100644
index 0000000..1256dde
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Animation/StartRotation.cs
@@ -0,0 +1,26 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Rigging.Animations
+{
+
+ // 记录初始rotation
+ public class StartRotation : MonoBehaviour
+ {
+ public Quaternion startRotation;
+
+ public Quaternion startRotationLocal;
+
+ private void Start()
+ {
+ startRotation = base.transform.rotation;
+ startRotationLocal = base.transform.localRotation;
+ }
+
+ private void Update()
+ {
+ }
+ }
+
+}
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Animation/StartRotation.cs.meta b/ActiveRagdoll/Assets/TABG/Scripts/Animation/StartRotation.cs.meta
new file mode 100644
index 0000000..0488045
--- /dev/null
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Animation/StartRotation.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 955e6a7dcac3f0f4c84ea79136fddc01
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Data/AnimationHandler.cs b/ActiveRagdoll/Assets/TABG/Scripts/Data/AnimationHandler.cs
index 6591e45..7a1a9f7 100644
--- a/ActiveRagdoll/Assets/TABG/Scripts/Data/AnimationHandler.cs
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Data/AnimationHandler.cs
@@ -20,8 +20,8 @@ namespace Rigging.Data
{
/*
0 Stand
- 1 Sprint
- 2 Run
+ 1 Run
+ 2 Sprint
3 Jump
*/
public IntString[] animationStates;
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Data/SetAnimationByInput.cs b/ActiveRagdoll/Assets/TABG/Scripts/Data/SetAnimationByInput.cs
index 3a90eb6..98444e3 100644
--- a/ActiveRagdoll/Assets/TABG/Scripts/Data/SetAnimationByInput.cs
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Data/SetAnimationByInput.cs
@@ -31,11 +31,11 @@ namespace Rigging.Data
{
if (input.isSpringting)
{
- anim.animationState = 1; // sprint
+ anim.animationState = 2; // sprint
}
else
{
- anim.animationState = 2; // run
+ anim.animationState = 1; // run
}
}
else
diff --git a/ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs b/ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs
index e04ff0d..f35f068 100644
--- a/ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs
+++ b/ActiveRagdoll/Assets/TABG/Scripts/Data/StepHandler.cs
@@ -61,5 +61,5 @@ namespace Rigging.Data
}
}
-
+
} \ No newline at end of file
diff --git a/ActiveRagdoll/Assets/TABG/Test.unity b/ActiveRagdoll/Assets/TABG/Test.unity
index d62c16f..89951d6 100644
--- a/ActiveRagdoll/Assets/TABG/Test.unity
+++ b/ActiveRagdoll/Assets/TABG/Test.unity
@@ -592,24 +592,6 @@ MonoBehaviour:
m_ShadowLayerMask: 1
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
---- !u!1 &1549273951 stripped
-GameObject:
- m_CorrespondingSourceObject: {fileID: 1808858621, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- m_PrefabInstance: {fileID: 8128778564773403800}
- m_PrefabAsset: {fileID: 0}
---- !u!114 &1549273962
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 1549273951}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: a7459e71d3133e747833a399f4895b51, type: 3}
- m_Name:
- m_EditorClassIdentifier:
--- !u!1 &1848931106
GameObject:
m_ObjectHideFlags: 0
@@ -1109,51 +1091,6 @@ PrefabInstance:
propertyPath: m_Name
value: human_rigging
objectReference: {fileID: 0}
- - target: {fileID: 7263518919066683589, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- propertyPath: animationStates.Array.size
- value: 4
- objectReference: {fileID: 0}
- - target: {fileID: 7263518919066683589, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- propertyPath: animationStates.Array.data[1].theInt
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 7263518919066683589, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- propertyPath: animationStates.Array.data[2].theInt
- value: 2
- objectReference: {fileID: 0}
- - target: {fileID: 7263518919066683589, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- propertyPath: animationStates.Array.data[3].theInt
- value: 3
- objectReference: {fileID: 0}
- - target: {fileID: 7263518919066683589, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- propertyPath: animationStates.Array.data[0].theString
- value: Stand
- objectReference: {fileID: 0}
- - target: {fileID: 7263518919066683589, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- propertyPath: animationStates.Array.data[1].theString
- value: Sprint
- objectReference: {fileID: 0}
- - target: {fileID: 7263518919066683589, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- propertyPath: animationStates.Array.data[2].theString
- value: Run
- objectReference: {fileID: 0}
- - target: {fileID: 7263518919066683589, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- propertyPath: animationStates.Array.data[3].theString
- value: Jump
- objectReference: {fileID: 0}
- - target: {fileID: 7846447219259762999, guid: fce18bbf37be1384eb1a089a94aac81d,
- type: 3}
- propertyPath: rotationTarget
- value:
- objectReference: {fileID: 5240332616388624504}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: fce18bbf37be1384eb1a089a94aac81d, type: 3}
--- !u!1001 &8277099497161960097