Fixed the rotations of details which used RemoveComponents

This commit is contained in:
Nick 2023-08-12 17:09:25 -04:00
parent 1416e07f9b
commit 9bd1b32270

View File

@ -187,8 +187,9 @@ namespace NewHorizons.Builder.Props
// Just swap all the children to a new game object
var newDetailGO = new GameObject(prop.name);
newDetailGO.SetActive(false);
newDetailGO.transform.position = prop.transform.position;
newDetailGO.transform.parent = prop.transform.parent;
newDetailGO.transform.position = prop.transform.position;
newDetailGO.transform.rotation = prop.transform.rotation;
// Can't modify parents while looping through children bc idk
var children = new List<Transform>();