Gizmo 방향이 회전되지 않는 버그 수정
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace RTG
|
namespace RTG
|
||||||
{
|
{
|
||||||
@@ -341,8 +342,19 @@ namespace RTG
|
|||||||
if (_transformSpace == GizmoSpace.Global) gizmoTransform.Rotation3D = Quaternion.identity;
|
if (_transformSpace == GizmoSpace.Global) gizmoTransform.Rotation3D = Quaternion.identity;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_targetPivotObject == null) gizmoTransform.Rotation3D = Quaternion.identity;
|
if (_targetPivotObject != null)
|
||||||
else gizmoTransform.Rotation3D = _targetPivotObject.transform.rotation;
|
{
|
||||||
|
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()
|
public void RefreshPositionAndRotation()
|
||||||
|
|||||||
Reference in New Issue
Block a user