Gizmo 방향이 회전되지 않는 버그 수정 #38
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user