Gizmo 방향이 회전되지 않는 버그 수정

This commit is contained in:
jmaniuvc
2025-04-01 11:51:53 +09:00
parent 66dab5acfd
commit 32f1f3d956

View File

@@ -1,6 +1,7 @@
using UnityEngine;
using System;
using System.Collections.Generic;
using System.Linq;
namespace RTG
{
@@ -341,8 +342,19 @@ namespace RTG
if (_transformSpace == GizmoSpace.Global) gizmoTransform.Rotation3D = Quaternion.identity;
else
{
if (_targetPivotObject == null) gizmoTransform.Rotation3D = Quaternion.identity;
else gizmoTransform.Rotation3D = _targetPivotObject.transform.rotation;
if (_targetPivotObject != null)
{
gizmoTransform.Rotation3D = _targetPivotObject.transform.rotation;
}
else if (_targetObjects.Count() == 1)
{
GameObject pivotObject = _targetObjects.First();
gizmoTransform.Rotation3D = pivotObject.transform.rotation;
}
else
{
gizmoTransform.Rotation3D = Quaternion.identity;
}
}
}
public void RefreshPositionAndRotation()