Player walk animations

-Added walk animation
-Added strafe animation
-Added animation blending for strafe and walk
-Added method that controls animation parameters based on movement speed

-smol canvas fix
This commit is contained in:
juliuse98
2021-11-28 18:54:24 +01:00
parent 20080a4dd5
commit a4fb6b9f33
14 changed files with 2576 additions and 220 deletions

View File

@@ -1,5 +1,86 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1102 &-9128348295522208378
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Walk
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -5070509629369109145}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!206 &-5070509629369109145
BlendTree:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blend Tree
m_Childs:
- serializedVersion: 2
m_Motion: {fileID: 5138602965388526686, guid: 67300382ec907c648b6b4156e8acd1ea, type: 3}
m_Threshold: 0
m_Position: {x: 0, y: 1}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Time
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 5138602965388526686, guid: 97968620e18a7bb47b9b9d1407b00047, type: 3}
m_Threshold: 0.25
m_Position: {x: 1, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Time
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 5138602965388526686, guid: 67300382ec907c648b6b4156e8acd1ea, type: 3}
m_Threshold: 0.5
m_Position: {x: 0, y: -1}
m_TimeScale: -1
m_CycleOffset: 0
m_DirectBlendParameter: Time
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 5138602965388526686, guid: 97968620e18a7bb47b9b9d1407b00047, type: 3}
m_Threshold: 0.75
m_Position: {x: -1, y: 0}
m_TimeScale: -1
m_CycleOffset: 0
m_DirectBlendParameter: Time
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 5138602965388526686, guid: 8db9a9e94be8f5e4fab0cca4493a7748, type: 3}
m_Threshold: 1
m_Position: {x: 0, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Time
m_Mirror: 0
m_BlendParameter: x
m_BlendParameterY: y
m_MinThreshold: 0
m_MaxThreshold: 1
m_UseAutomaticThresholds: 1
m_NormalizedBlendValues: 0
m_BlendType: 2
--- !u!1102 &-781170557910458175
AnimatorState:
serializedVersion: 6
@@ -64,6 +145,9 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: -529539563782206978}
m_Position: {x: 400, y: 210, z: 0}
- serializedVersion: 1
m_State: {fileID: -9128348295522208378}
m_Position: {x: 480, y: 100, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
@@ -73,7 +157,7 @@ AnimatorStateMachine:
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -529539563782206978}
m_DefaultState: {fileID: -9128348295522208378}
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
@@ -88,13 +172,25 @@ AnimatorController:
m_DefaultFloat: 1
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: Blend
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_Controller: {fileID: 0}
- m_Name: x
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: y
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer

View File

@@ -26,6 +26,7 @@ Transform:
m_LocalRotation: {x: -0, y: 0.7071068, z: 0.7071068, w: 0}
m_LocalPosition: {x: 4.4113026, y: -1.3282752, z: 10.768935}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7365407325767981108}
m_RootOrder: 1
@@ -57,6 +58,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7365407325624913735}
m_Father: {fileID: 7365407325767981108}
@@ -64,7 +66,7 @@ Transform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &7365407324475125414
Animator:
serializedVersion: 3
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
@@ -77,6 +79,7 @@ Animator:
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
@@ -107,6 +110,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7365407324475125409}
m_RootOrder: 0
@@ -141,6 +145,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.108, y: -0.084, z: 0.266}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7365407324475125409}
- {fileID: 6708222704297240606}
@@ -193,7 +198,7 @@ BoxCollider:
m_GameObject: {fileID: 7365407325767981110}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Enabled: 0
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
@@ -239,6 +244,7 @@ Transform:
m_LocalRotation: {x: -0, y: 0.7071068, z: 0.7071068, w: 0}
m_LocalPosition: {x: 4.471302, y: -1.3182755, z: 10.768935}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7365407325767981108}
m_RootOrder: 2