Switch to new soldier model and animations

This commit is contained in:
Jens Pitkänen 2020-08-10 00:50:54 +03:00
parent f4303677a4
commit 5217a351d1
7 changed files with 191 additions and 345 deletions

View File

@ -485,6 +485,26 @@ PrefabInstance:
propertyPath: m_Layer propertyPath: m_Layer
value: 10 value: 10
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2498596356784760024, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2498596356784760024, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2498596356784760024, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2498596356784760024, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2498596356784760024, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2517059903146761516, guid: 0bffd92c46c257840806f5e957954800, type: 3} - target: {fileID: 2517059903146761516, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_Layer propertyPath: m_Layer
value: 10 value: 10
@ -541,6 +561,26 @@ PrefabInstance:
propertyPath: m_Layer propertyPath: m_Layer
value: 10 value: 10
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4103164600241655739, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4103164600241655739, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4103164600241655739, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4103164600241655739, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4103164600241655739, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4165450804291122350, guid: 0bffd92c46c257840806f5e957954800, type: 3} - target: {fileID: 4165450804291122350, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_Layer propertyPath: m_Layer
value: 10 value: 10
@ -717,6 +757,14 @@ PrefabInstance:
propertyPath: m_Layer propertyPath: m_Layer
value: 10 value: 10
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7931246460515997121, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: 143e6d49c5bcf64459b414767d2b4dab, type: 2}
- target: {fileID: 7931246460515997121, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_ApplyRootMotion
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8048983936687622071, guid: 0bffd92c46c257840806f5e957954800, type: 3} - target: {fileID: 8048983936687622071, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_Layer propertyPath: m_Layer
value: 10 value: 10
@ -737,6 +785,14 @@ PrefabInstance:
propertyPath: m_Layer propertyPath: m_Layer
value: 10 value: 10
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8380320334439546530, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: 143e6d49c5bcf64459b414767d2b4dab, type: 2}
- target: {fileID: 8380320334439546530, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: m_ApplyRootMotion
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8393781323051440261, guid: 0bffd92c46c257840806f5e957954800, type: 3} - target: {fileID: 8393781323051440261, guid: 0bffd92c46c257840806f5e957954800, type: 3}
propertyPath: GunGluedToHand propertyPath: GunGluedToHand
value: 0 value: 0

View File

@ -2182,67 +2182,6 @@ Light:
m_UseBoundingSphereOverride: 0 m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0 m_ShadowRadius: 0
m_ShadowAngle: 0 m_ShadowAngle: 0
--- !u!1001 &1661272346
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalPosition.x
value: -0.63
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalPosition.z
value: 3.52
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_RootOrder
value: 10
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_Name
value: SoldierM
objectReference: {fileID: 0}
- target: {fileID: 5866666021909216657, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: 143e6d49c5bcf64459b414767d2b4dab, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e18005d630710ec40b4e791ef3ee97c7, type: 3}
--- !u!1 &1734890295 --- !u!1 &1734890295
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -1,171 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1101 &-6817643798228820987
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 0}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1107 &-3850017426517049074
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -1298174354730275150}
m_Position: {x: 330, y: 100, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
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: -1298174354730275150}
--- !u!1102 &-1298174354730275150
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: PlayerAnimBlend
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: 2870818079028442837}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Animator Controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -3850017426517049074}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!206 &2870818079028442837
BlendTree:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: PlayerAnimBlend
m_Childs:
- serializedVersion: 2
m_Motion: {fileID: 5601054235094793752, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 0
m_Position: {x: -1, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: -6390282035870482739, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 0.33333334
m_Position: {x: 1, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: -4987167507176748680, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 0.6666667
m_Position: {x: 0, y: -1}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 4767594854432372465, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 1
m_Position: {x: 0, y: 1}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: -2101640418457204544, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 1.3333333
m_Position: {x: 0, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
m_BlendParameter: Forward
m_BlendParameterY: Right
m_MinThreshold: 0
m_MaxThreshold: 1.3333333
m_UseAutomaticThresholds: 0
m_NormalizedBlendValues: 0
m_BlendType: 2
--- !u!1101 &3577526297946573294
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 0}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 143e6d49c5bcf64459b414767d2b4dab
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,6 +1,28 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1107 &-2994020296533553668 --- !u!1101 &-6817643798228820987
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 0}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1107 &-3850017426517049074
AnimatorStateMachine: AnimatorStateMachine:
serializedVersion: 5 serializedVersion: 5
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
@ -10,11 +32,8 @@ AnimatorStateMachine:
m_Name: Base Layer m_Name: Base Layer
m_ChildStates: m_ChildStates:
- serializedVersion: 1 - serializedVersion: 1
m_State: {fileID: 121955879383565415} m_State: {fileID: -1298174354730275150}
m_Position: {x: 328.17694, y: 119.46246, z: 0} m_Position: {x: 330, y: 100, z: 0}
- serializedVersion: 1
m_State: {fileID: -2411588535508867930}
m_Position: {x: 320, y: 220, z: 0}
m_ChildStateMachines: [] m_ChildStateMachines: []
m_AnyStateTransitions: [] m_AnyStateTransitions: []
m_EntryTransitions: [] m_EntryTransitions: []
@ -24,99 +43,18 @@ AnimatorStateMachine:
m_EntryPosition: {x: 50, y: 120, z: 0} m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 121955879383565415} m_DefaultState: {fileID: -1298174354730275150}
--- !u!1102 &-2411588535508867930 --- !u!1102 &-1298174354730275150
AnimatorState: AnimatorState:
serializedVersion: 5 serializedVersion: 5
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Soldier_Male|Run m_Name: PlayerAnimBlend
m_Speed: 2
m_CycleOffset: 0
m_Transitions:
- {fileID: -1568754369849136019}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 1
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -7877090130408139780, guid: ea51153f3987f82408984d8da65a9969, type: 3}
m_Tag:
m_SpeedParameter: Movement
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-1568754369849136019
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 4
m_ConditionEvent: Movement
m_EventTreshold: 0.1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 121955879383565415}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.6666666
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SoldierAnimator
serializedVersion: 5
m_AnimatorParameters:
- m_Name: Movement
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -2994020296533553668}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &121955879383565415
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Soldier_Male|Idle
m_Speed: 1 m_Speed: 1
m_CycleOffset: 0 m_CycleOffset: 0
m_Transitions: m_Transitions: []
- {fileID: 5629410763917336406}
m_StateMachineBehaviours: [] m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0} m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0 m_IKOnFeet: 0
@ -126,32 +64,118 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: 1921100349683250907, guid: ea51153f3987f82408984d8da65a9969, type: 3} m_Motion: {fileID: 2870818079028442837}
m_Tag: m_Tag:
m_SpeedParameter: m_SpeedParameter:
m_MirrorParameter: m_MirrorParameter:
m_CycleOffsetParameter: m_CycleOffsetParameter:
m_TimeParameter: m_TimeParameter:
--- !u!1101 &5629410763917336406 --- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SoldierAnimator
serializedVersion: 5
m_AnimatorParameters:
- m_Name: Forward
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: Right
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -3850017426517049074}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!206 &2870818079028442837
BlendTree:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: PlayerAnimBlend
m_Childs:
- serializedVersion: 2
m_Motion: {fileID: 5601054235094793752, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 0
m_Position: {x: -1, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: -6390282035870482739, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 0.33333334
m_Position: {x: 1, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: -4987167507176748680, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 0.6666667
m_Position: {x: 0, y: -1}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 4767594854432372465, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 1
m_Position: {x: 0, y: 1}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: -2101640418457204544, guid: f4a651f8db888f24f89c447a975f1a04, type: 3}
m_Threshold: 1.3333333
m_Position: {x: 0, y: 0}
m_TimeScale: 1
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
m_BlendParameter: Forward
m_BlendParameterY: Right
m_MinThreshold: 0
m_MaxThreshold: 1.3333333
m_UseAutomaticThresholds: 0
m_NormalizedBlendValues: 0
m_BlendType: 2
--- !u!1101 &3577526297946573294
AnimatorStateTransition: AnimatorStateTransition:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: m_Name:
m_Conditions: m_Conditions: []
- m_ConditionMode: 3
m_ConditionEvent: Movement
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0} m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -2411588535508867930} m_DstState: {fileID: 0}
m_Solo: 0 m_Solo: 0
m_Mute: 0 m_Mute: 0
m_IsExit: 0 m_IsExit: 0
serializedVersion: 3 serializedVersion: 3
m_TransitionDuration: 0.25 m_TransitionDuration: 0.25
m_TransitionOffset: 0 m_TransitionOffset: 0
m_ExitTime: 0 m_ExitTime: 0.75
m_HasExitTime: 1 m_HasExitTime: 1
m_HasFixedDuration: 1 m_HasFixedDuration: 1
m_InterruptionSource: 0 m_InterruptionSource: 0

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9917118805dd64449bd5bc1b9d284eff guid: 143e6d49c5bcf64459b414767d2b4dab
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 0 mainObjectFileID: 0

View File

@ -38,14 +38,20 @@ namespace NeonTea.Quakeball.Animation {
} }
private void Update() { private void Update() {
Animator.SetFloat("Movement", Player.GroundVelocity.magnitude / Player.MoveStyle.TargetVelocity); float Right = Vector3.Dot(Player.GroundVelocity.normalized, transform.right);
float Forward = Vector3.Dot(Player.GroundVelocity.normalized, transform.forward);
float RelativeSpeed = Player.GroundVelocity.magnitude / Player.MoveStyle.TargetVelocity;
Right = Mathf.Clamp(Right * RelativeSpeed, -0.999f, 0.999f);
Forward = Mathf.Clamp(Forward * RelativeSpeed, -.999f, 0.999f);
// Square the circle:
Forward = 0.5f * Mathf.Sqrt(2 - Right * Right + Forward * Forward + 2 * Forward * Mathf.Sqrt(2)) - 0.5f * Mathf.Sqrt(2 - Right * Right + Forward * Forward - 2 * Forward * Mathf.Sqrt(2));
Right = 0.5f * Mathf.Sqrt(2 + Right * Right - Forward * Forward + 2 * Right * Mathf.Sqrt(2)) - 0.5f * Mathf.Sqrt(2 + Right * Right - Forward * Forward - 2 * Right * Mathf.Sqrt(2));
Animator.SetFloat("Forward", Forward);
Animator.SetFloat("Right", Right);
} }
private void LateUpdate() { private void LateUpdate() {
if (Player.GroundVelocity.magnitude > 0) { transform.localEulerAngles = new Vector3(0, Player.Yaw, 0);
BodyYaw = Vector3.SignedAngle(Vector3.forward, Player.GroundVelocity.normalized, Vector3.up);
}
transform.localEulerAngles = new Vector3(0, BodyYaw, 0);
if (GunGluedToHand) { if (GunGluedToHand) {
Vector3 GunOffset = GunHandle.position - Gun.position; Vector3 GunOffset = GunHandle.position - Gun.position;