Skip to content

Commit

Permalink
feat(animations): add run animations and controls
Browse files Browse the repository at this point in the history
  • Loading branch information
PottierLoic committed Jun 10, 2024
1 parent 8ec4335 commit 8548ba3
Show file tree
Hide file tree
Showing 8 changed files with 407 additions and 170 deletions.
121 changes: 89 additions & 32 deletions Assets/Animations/Character/Character.controller
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ AnimatorState:
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 6e2ea5b1d092d69458da79ae32d83e85, type: 2}
m_Motion: {fileID: 7400000, guid: e5dce7294d9543b4799b9ca793af168f, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
Expand Down Expand Up @@ -156,6 +156,32 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &-4273713115659630021
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CharacterRunBack
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: 7400000, guid: 560c733e6866e7c41a7bfdb2c261f91f, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &-4043207049189278793
AnimatorState:
serializedVersion: 6
Expand Down Expand Up @@ -216,37 +242,7 @@ AnimatorController:
m_PrefabAsset: {fileID: 0}
m_Name: Character
serializedVersion: 5
m_AnimatorParameters:
- m_Name: isWalking
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: left
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: right
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: front
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: back
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
Expand Down Expand Up @@ -334,6 +330,15 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: -4698337072456826926}
m_Position: {x: 1055, y: 495, z: 0}
- serializedVersion: 1
m_State: {fileID: -4273713115659630021}
m_Position: {x: 1090, y: 560, z: 0}
- serializedVersion: 1
m_State: {fileID: 7405059776857870088}
m_Position: {x: 1125, y: 625, z: 0}
- serializedVersion: 1
m_State: {fileID: 5605280797586097164}
m_Position: {x: 1160, y: 690, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
Expand Down Expand Up @@ -422,6 +427,58 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &5605280797586097164
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CharacterRunLeft
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: 7400000, guid: dc675a555881e0c46ac6740eb311db7b, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &7405059776857870088
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: CharacterRunRight
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: 7400000, guid: b0beec8bea34957409f57642477307ab, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &8030753922275029508
AnimatorState:
serializedVersion: 6
Expand Down
48 changes: 44 additions & 4 deletions Assets/Animations/Character/CharacterRunBack.anim
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,55 @@ AnimationClip:
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_PPtrCurves:
- serializedVersion: 2
curve:
- time: 0
value: {fileID: 593429516, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.125
value: {fileID: 1350399102, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.25
value: {fileID: -1060057399, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.375
value: {fileID: -56701497, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.5
value: {fileID: 2128785279, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.625
value: {fileID: 1782332815, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.75
value: {fileID: -2123928779, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.875
value: {fileID: -818000941, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
flags: 2
m_SampleRate: 8
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
isIntCurve: 0
isSerializeReferenceCurve: 0
pptrCurveMapping:
- {fileID: 593429516, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 1350399102, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -1060057399, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -56701497, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 2128785279, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 1782332815, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -2123928779, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -818000941, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
Expand Down
48 changes: 44 additions & 4 deletions Assets/Animations/Character/CharacterRunFront.anim
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,55 @@ AnimationClip:
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_PPtrCurves:
- serializedVersion: 2
curve:
- time: 0
value: {fileID: 61798146, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.125
value: {fileID: 442774115, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.25
value: {fileID: 581453766, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.375
value: {fileID: 1423108238, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.5
value: {fileID: 878173527, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.625
value: {fileID: 1519892496, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.75
value: {fileID: -813101596, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.875
value: {fileID: -804019818, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
flags: 2
m_SampleRate: 8
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
isIntCurve: 0
isSerializeReferenceCurve: 0
pptrCurveMapping:
- {fileID: 61798146, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 442774115, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 581453766, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 1423108238, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 878173527, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 1519892496, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -813101596, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -804019818, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
Expand Down
48 changes: 44 additions & 4 deletions Assets/Animations/Character/CharacterRunLeft.anim
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,55 @@ AnimationClip:
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_PPtrCurves:
- serializedVersion: 2
curve:
- time: 0
value: {fileID: -1064079049, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.125
value: {fileID: -538753899, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.25
value: {fileID: -1517949462, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.375
value: {fileID: 92650613, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.5
value: {fileID: 1784107931, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.625
value: {fileID: 1870198602, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.75
value: {fileID: -387578661, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.875
value: {fileID: 825741684, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
flags: 2
m_SampleRate: 8
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
isIntCurve: 0
isSerializeReferenceCurve: 0
pptrCurveMapping:
- {fileID: -1064079049, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -538753899, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -1517949462, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 92650613, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 1784107931, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 1870198602, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -387578661, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 825741684, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
Expand Down
48 changes: 44 additions & 4 deletions Assets/Animations/Character/CharacterRunRight.anim
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,55 @@ AnimationClip:
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_PPtrCurves:
- serializedVersion: 2
curve:
- time: 0
value: {fileID: -52938890, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.125
value: {fileID: -1954995486, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.25
value: {fileID: 749416847, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.375
value: {fileID: 491451891, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.5
value: {fileID: -1999624086, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.625
value: {fileID: -1009323283, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.75
value: {fileID: 775196088, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- time: 0.875
value: {fileID: 1422141492, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
attribute: m_Sprite
path:
classID: 212
script: {fileID: 0}
flags: 2
m_SampleRate: 8
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
genericBindings:
- serializedVersion: 2
path: 0
attribute: 0
script: {fileID: 0}
typeID: 212
customType: 23
isPPtrCurve: 1
isIntCurve: 0
isSerializeReferenceCurve: 0
pptrCurveMapping:
- {fileID: -52938890, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -1954995486, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 749416847, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 491451891, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -1999624086, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: -1009323283, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 775196088, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
- {fileID: 1422141492, guid: cb452b35ade60144ca0571d7671f1b30, type: 3}
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
Expand Down
Loading

0 comments on commit 8548ba3

Please sign in to comment.