유닛 생성시 UnitController의 rotation에 영향을 받던 문제 해결

This commit is contained in:
NTG_Lenovo 2023-08-22 12:34:18 +09:00
parent 13cfeb3315
commit 60da0d14a1
2 changed files with 52991 additions and 52986 deletions

File diff suppressed because it is too large Load Diff

View File

@ -129,6 +129,10 @@ namespace BlueWaterProject
return;
}
var unitControllerTransform = unitController.transform;
var unitControllerRotation = unitControllerTransform.rotation;
unitControllerTransform.rotation = Quaternion.identity;
for (var i = 0; i < unitController.unit.soliderCount; i++)
{
var row = i / matrix.columns;
@ -159,6 +163,7 @@ namespace BlueWaterProject
soldierObject.name = newSoldierName;
unitController.unit.soldierList.Add(soldierObject);
}
unitController.transform.rotation *= unitControllerRotation;
}
/// <summary>