continuing with combat, sword combos working, not finished, blockign working, need to build blockpush and improving bow combat
This commit is contained in:
@@ -65,12 +65,17 @@ namespace Synty.AnimationBaseLocomotion.Samples
|
||||
|
||||
private Transform _syntyCamera;
|
||||
|
||||
private float _currentAimShift = 0f;
|
||||
private BowAimLayerController _bowController;
|
||||
|
||||
/// <inheritdoc cref="Start" />
|
||||
private void Start()
|
||||
{
|
||||
_syntyCamera = gameObject.transform.GetChild(0);
|
||||
|
||||
_inputReader = _syntyCharacter.GetComponent<InputReader>();
|
||||
_bowController = _syntyCharacter.GetComponent<BowAimLayerController>();
|
||||
|
||||
_playerTarget = _syntyCharacter.transform.Find("SyntyPlayer_LookAt");
|
||||
_lockOnTarget = _syntyCharacter.transform.Find("TargetLockOnPos");
|
||||
|
||||
@@ -124,7 +129,11 @@ namespace Synty.AnimationBaseLocomotion.Samples
|
||||
transform.position = _newPosition;
|
||||
transform.eulerAngles = new Vector3(_newAngleX, _newAngleY, 0);
|
||||
|
||||
_syntyCamera.localPosition = new Vector3(_cameraHorizontalOffset, _cameraHeightOffset, _cameraDistance * -1);
|
||||
// Calculate Over the Shoulder Shift
|
||||
float targetAimShift = (_bowController != null && _bowController.IsAiming) ? 0.8f : 0f;
|
||||
_currentAimShift = Mathf.Lerp(_currentAimShift, targetAimShift, 10f * Time.deltaTime);
|
||||
|
||||
_syntyCamera.localPosition = new Vector3(_cameraHorizontalOffset + _currentAimShift, _cameraHeightOffset, _cameraDistance * -1);
|
||||
_syntyCamera.localEulerAngles = new Vector3(_cameraTiltOffset, 0f, 0f);
|
||||
|
||||
_lastPosition = _newPosition;
|
||||
|
||||
Reference in New Issue
Block a user