From 81b266c288e7ee7b12e855482a1578d47a211d84 Mon Sep 17 00:00:00 2001 From: Valdimir Date: Tue, 28 Feb 2023 07:28:57 +0200 Subject: [PATCH] small anim fixes --- .../Animations/FemaleAnimation.controller | 21 +- .../Characters/Animations/Sit To Stand.anim | 1182 ++++++++++++++++- .../Characters/Animations/Stand To Sit.anim | 2 +- Assets/Scripts/Player.cs | 49 +- 4 files changed, 1209 insertions(+), 45 deletions(-) diff --git a/Assets/Characters/Animations/FemaleAnimation.controller b/Assets/Characters/Animations/FemaleAnimation.controller index b6b7123f..202eaf84 100644 --- a/Assets/Characters/Animations/FemaleAnimation.controller +++ b/Assets/Characters/Animations/FemaleAnimation.controller @@ -95,9 +95,9 @@ AnimatorStateTransition: m_Mute: 0 m_IsExit: 0 serializedVersion: 3 - m_TransitionDuration: 0.25 + m_TransitionDuration: 0 m_TransitionOffset: 0 - m_ExitTime: 0.88805974 + m_ExitTime: 0.000000001239959 m_HasExitTime: 0 m_HasFixedDuration: 1 m_InterruptionSource: 0 @@ -168,31 +168,31 @@ AnimatorController: m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: Fall m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: velX m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: WalkVelocity m_Type: 1 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} - m_Name: SitDown m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 m_DefaultBool: 0 - m_Controller: {fileID: 0} + m_Controller: {fileID: 9100000} m_AnimatorLayers: - serializedVersion: 5 m_Name: Base Layer @@ -393,7 +393,10 @@ AnimatorStateTransition: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: - m_Conditions: [] + m_Conditions: + - m_ConditionMode: 2 + m_ConditionEvent: Walk + m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} m_DstState: {fileID: -5486930935274134635} m_Solo: 0 @@ -403,7 +406,7 @@ AnimatorStateTransition: m_TransitionDuration: 0.25 m_TransitionOffset: 0 m_ExitTime: 0.96153843 - m_HasExitTime: 1 + m_HasExitTime: 0 m_HasFixedDuration: 1 m_InterruptionSource: 0 m_OrderedInterruption: 1 diff --git a/Assets/Characters/Animations/Sit To Stand.anim b/Assets/Characters/Animations/Sit To Stand.anim index cd402a3f..dbc58b6e 100644 --- a/Assets/Characters/Animations/Sit To Stand.anim +++ b/Assets/Characters/Animations/Sit To Stand.anim @@ -32715,7 +32715,1177 @@ AnimationClip: m_Center: {x: 0, y: 0, z: 0} m_Extent: {x: 0, y: 0, z: 0} m_ClipBindingConstant: - genericBindings: [] + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 8 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 9 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 13 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 24 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 97 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 100 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 117 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 7 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 10 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 11 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 12 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 14 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 15 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 16 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 17 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 18 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 19 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 20 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 21 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 22 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 23 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 25 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 26 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 27 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 28 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 29 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 30 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 31 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 32 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 33 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 34 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 35 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 36 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 37 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 38 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 39 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 40 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 41 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 42 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 43 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 44 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 45 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 46 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 47 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 48 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 49 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 50 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 51 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 52 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 53 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 54 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 55 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 56 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 63 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 64 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 65 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 66 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 67 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 68 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 69 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 70 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 71 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 72 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 73 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 74 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 75 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 76 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 77 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 78 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 79 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 80 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 81 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 82 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 83 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 84 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 85 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 86 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 87 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 88 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 89 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 90 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 91 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 92 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 93 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 94 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 95 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 96 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 98 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 99 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 101 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 102 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 103 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 104 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 105 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 106 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 107 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 108 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 109 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 110 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 111 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 112 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 113 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 114 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 115 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 116 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 118 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 119 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 120 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 121 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 122 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 123 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 124 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 125 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 126 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 127 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 128 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 129 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 130 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 131 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 132 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 133 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 134 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 135 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 136 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 57 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 58 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 59 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 60 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 61 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 62 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 pptrCurveMapping: [] m_AnimationClipSettings: serializedVersion: 2 @@ -32730,12 +33900,12 @@ AnimationClip: m_LoopTime: 0 m_LoopBlend: 0 m_LoopBlendOrientation: 0 - m_LoopBlendPositionY: 0 - m_LoopBlendPositionXZ: 0 + m_LoopBlendPositionY: 1 + m_LoopBlendPositionXZ: 1 m_KeepOriginalOrientation: 0 - m_KeepOriginalPositionY: 1 - m_KeepOriginalPositionXZ: 1 - m_HeightFromFeet: 0 + m_KeepOriginalPositionY: 0 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 1 m_Mirror: 0 m_EditorCurves: [] m_EulerEditorCurves: [] diff --git a/Assets/Characters/Animations/Stand To Sit.anim b/Assets/Characters/Animations/Stand To Sit.anim index 91d889cd..fc5e3e0a 100644 --- a/Assets/Characters/Animations/Stand To Sit.anim +++ b/Assets/Characters/Animations/Stand To Sit.anim @@ -34261,7 +34261,7 @@ AnimationClip: m_LoopBlend: 0 m_LoopBlendOrientation: 0 m_LoopBlendPositionY: 0 - m_LoopBlendPositionXZ: 0 + m_LoopBlendPositionXZ: 1 m_KeepOriginalOrientation: 0 m_KeepOriginalPositionY: 0 m_KeepOriginalPositionXZ: 0 diff --git a/Assets/Scripts/Player.cs b/Assets/Scripts/Player.cs index d69bf95d..b70c284f 100644 --- a/Assets/Scripts/Player.cs +++ b/Assets/Scripts/Player.cs @@ -83,51 +83,40 @@ public class Player : MonoBehaviour } } - - private TaskStatus MoveToPoint() { - + SetPlayerState(ActionStates.Walking); + var worldDeltaPosition = _navAgent.nextPosition - transform.position; _groundDeltaPosition.x = Vector3.Dot(transform.right, worldDeltaPosition); _groundDeltaPosition.y = Vector3.Dot(transform.forward, worldDeltaPosition); Vector2 velocity = (Time.deltaTime > 1e-5f) ? _groundDeltaPosition / Time.deltaTime : Vector2.zero; - var shouldMove = velocity.magnitude > 0.025f && _navAgent.remainingDistance > _navAgent.radius; - - - - if (_currentState == ActionStates.Sitting) - { - SetPlayerState(ActionStates.Standing); - - } - _currentState = shouldMove ? ActionStates.Walking : ActionStates.Idle; - - SetPlayerState(ActionStates.Walking); _animator.SetFloat(WALK_VELOCITY, velocity.y); - + return pathComplete(_navAgent.destination) ? TaskStatus.Complete : TaskStatus.InProgress; } + private bool pathComplete(Vector3 destination) + { + if (Vector3.Distance(destination, _navAgent.transform.position) <= _navAgent.radius) + { + if (!_navAgent.hasPath || _navAgent.velocity.sqrMagnitude == 0f) + { + SetPlayerState(ActionStates.Idle); + return true; + } + } + + return false; + } + public void Rotate(Vector3 target) { Quaternion rotation = Quaternion.LookRotation(target); transform.rotation = rotation; } - private bool pathComplete(Vector3 destination) - { - if (Vector3.Distance(destination, _navAgent.transform.position) <= _navAgent.radius) - { - if (!_navAgent.hasPath || _navAgent.velocity.sqrMagnitude == 0f) - { - SetPlayerState(ActionStates.Idle); - return true; - } - } - - return false; - } + private TaskStatus InteractWithObject(BaseInteractableObject interactableObject) { @@ -137,6 +126,8 @@ public class Player : MonoBehaviour public void SetPlayerState(ActionStates newState) { + if(newState== _currentState) + { return; } switch (newState) { case ActionStates.Idle: