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

Merged
UVCXR merged 2 commits from sjm/250401 into main 2025-04-01 11:53:47 +09:00

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()