This commit is contained in:
SoulliesOfficial
2025-12-22 23:27:18 -05:00
parent a2052bfe16
commit eaa688c7a9
21 changed files with 12530 additions and 10078 deletions

View File

@@ -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
{

View File

@@ -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");

View File

@@ -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)
{

View File

@@ -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 目标