调整
This commit is contained in:
@@ -99,9 +99,9 @@ namespace Cielonos.MainGame.Characters
|
||||
{
|
||||
if (IsMoving)
|
||||
{
|
||||
Vector3 direction = new Vector3(Move.x, 0, Move.y);
|
||||
operation.Dash(direction);
|
||||
preinputSubmodule.RegisterPreinputAction(() => operation.Dash(direction), 10);
|
||||
Vector3 inputDirection = new Vector3(Move.x, 0, Move.y);
|
||||
operation.Dash(inputDirection);
|
||||
preinputSubmodule.RegisterPreinputAction(() => operation.Dash(inputDirection), 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -21,11 +21,11 @@ namespace Cielonos.MainGame.Characters
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
player.operationSc.OnDash += delegate(Vector3 dashDirection)
|
||||
player.operationSc.OnDash += delegate(Vector3 inputDirection)
|
||||
{
|
||||
player.landMovementSc.TurnToDirection(dashDirection);
|
||||
Vector3 cameraForward = player.viewSc.playerCamera.transform.forward.Flatten();
|
||||
Vector3 dashCameraRotation = CalculateDashAngles(dashDirection, cameraForward);
|
||||
player.landMovementSc.TurnToDirection(inputDirection);
|
||||
Vector3 dashCameraRotation = CalculateDashAngles(inputDirection, cameraForward);
|
||||
player.feedbackSc["Dash"].feedback.GetFeedbackOfType<MMF_CinemachineRotation>().RotationAmplitude = dashCameraRotation;
|
||||
player.feedbackSc["Dash"].feedback.GetFeedbackOfType<MMF_RadialBlur>().TargetCenter = player.GetNormalizedScreenPosition();
|
||||
fullBodyFuncAnimSm.Play("Dash");
|
||||
|
||||
@@ -64,6 +64,12 @@ namespace Cielonos.MainGame.Characters
|
||||
|
||||
viewSc.cameraRoot.rotation = Quaternion.Euler(
|
||||
cinemachineTargetPitch + cameraAngleOverride /*- viewSc.muzzleLiftModule.currentMuzzlePositionY*/, cinemachineTargetYaw, 0.0f);
|
||||
|
||||
if (viewSc.isLockingTarget)
|
||||
{
|
||||
cinemachineEndLockYaw = viewSc.lockOnCamera.transform.eulerAngles.y;
|
||||
}
|
||||
|
||||
/*
|
||||
if (player.motionController.characterRotationType == PlayerMotionController.CharacterRotationType.ByAiming)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Cielonos.MainGame.Characters
|
||||
public CinemachineStateDrivenCamera stateDrivenCamera;
|
||||
public CinemachineCamera freeLookCamera;
|
||||
public CinemachineCamera lockOnCamera;
|
||||
public bool isLockedOn = false;
|
||||
[FormerlySerializedAs("isLockedOn")] public bool isLockingTarget = false;
|
||||
public bool isLockedSetRoot;
|
||||
public CharacterBase testEnemy;
|
||||
public Transform testEnemyTarget;
|
||||
@@ -43,7 +43,7 @@ namespace Cielonos.MainGame.Characters
|
||||
{
|
||||
if (Keyboard.current.tabKey.wasPressedThisFrame)
|
||||
{
|
||||
if (!isLockedOn)
|
||||
if (!isLockingTarget)
|
||||
{
|
||||
SwitchToLockTarget( testEnemyTarget );
|
||||
}
|
||||
@@ -56,9 +56,11 @@ namespace Cielonos.MainGame.Characters
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
if (!isLockedOn)
|
||||
cameraRotationSm.Update();
|
||||
|
||||
if (!isLockingTarget)
|
||||
{
|
||||
cameraRotationSm.Update();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -72,7 +74,7 @@ namespace Cielonos.MainGame.Characters
|
||||
void SwitchToLockTarget(Transform target)
|
||||
{
|
||||
testEnemyTarget = target;
|
||||
isLockedOn = true;
|
||||
isLockingTarget = true;
|
||||
isLockedSetRoot = false;
|
||||
|
||||
// --- CM3 核心操作 ---
|
||||
@@ -91,7 +93,7 @@ namespace Cielonos.MainGame.Characters
|
||||
{
|
||||
cameraRotationSm.SyncRotationWithCamera(playerCamera);
|
||||
|
||||
isLockedOn = false;
|
||||
isLockingTarget = false;
|
||||
|
||||
// --- CM3 核心操作 ---
|
||||
// 1. 重置 LookAt 目标
|
||||
|
||||
Reference in New Issue
Block a user