爆修
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user