This commit is contained in:
SoulliesOfficial
2026-03-30 03:23:36 -04:00
parent 7533e7031d
commit 7954ec800c
56 changed files with 23688 additions and 18808 deletions

View File

@@ -122,7 +122,14 @@ namespace Ichni.Editor
{
isRotatingSceneCamera = true;
// 初始化当前旋转角度,防止旋转跳变
_currentRotation = sceneCameraTransform.eulerAngles;
// 注意Unity 的 eulerAngles 返回 0~360需要将 X 分量规范化到 -180~180
// 避免 DOTween/PanelDrawer 残留的 (90,0,0) 被直接拾取后造成瞬间俯视
Vector3 rawAngles = sceneCameraTransform.eulerAngles;
_currentRotation = new Vector3(
rawAngles.x > 180f ? rawAngles.x - 360f : rawAngles.x,
rawAngles.y > 180f ? rawAngles.y - 360f : rawAngles.y,
0f
);
}
else if (mouse.rightButton.wasReleasedThisFrame)
{