浏览代码

Improvement: Warrior Movement Blending is now Smoother

/V2
andytouch 4 年前
当前提交
66a99daf
共有 3 个文件被更改,包括 12 次插入6 次删除
  1. 4
      InputSystem_Warriors_Project/Assets/Scenes/Scene_Example_Warriors.unity
  2. 10
      InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerController.cs
  3. 4
      InputSystem_Warriors_Project/Assets/Warrior/Animations/AnimationController_Warrior.controller

4
InputSystem_Warriors_Project/Assets/Scenes/Scene_Example_Warriors.unity


m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1833978498}
m_LocalRotation: {x: 0.18110336, y: -0.002146068, z: 0.00039519602, w: 0.9834617}
m_LocalPosition: {x: 0.016107878, y: -4.5914693, z: -3.690742}
m_LocalRotation: {x: 0.46135902, y: -0.0019360891, z: 0.0010067867, w: 0.88721085}
m_LocalPosition: {x: 0.0071905926, y: -1.5091524, z: -1.6475554}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 193751149}

10
InputSystem_Warriors_Project/Assets/Scripts/Behaviours/Player/PlayerController.cs


//This is automatically called from PlayerInput, when the input device has been disconnected and can not be identified
//IE: Device unplugged or has run out of batteries
//This is automatically called from PlayerInput, then the input device reconnected
public void OnDeviceRegained()
{
StartCoroutine(WaitForDeviceToBeRegained());

yield return new WaitForSeconds(0.1f);
playerVisualsBehaviour.UpdatePlayerVisuals();
}

void UpdatePlayerAnimationMovement()
{
playerAnimationBehaviour.UpdateMovementAnimation(rawInputMovement.sqrMagnitude);
playerAnimationBehaviour.UpdateMovementAnimation(smoothInputMovement.magnitude);
}

4
InputSystem_Warriors_Project/Assets/Warrior/Animations/AnimationController_Warrior.controller


m_Mirror: 0
- serializedVersion: 2
m_Motion: {fileID: 7400000, guid: d95ff3ad3e3bb7f4fada1c33e41531f3, type: 3}
m_Threshold: 0.2
m_Threshold: 0.5
m_Position: {x: 0, y: 0}
m_TimeScale: 1
m_CycleOffset: 0

m_BlendParameterY: Movement
m_MinThreshold: 0
m_MaxThreshold: 0.2
m_MaxThreshold: 0.5
m_UseAutomaticThresholds: 0
m_NormalizedBlendValues: 0
m_BlendType: 0

正在加载...
取消
保存