unity how to stop child moving with parent code example
Example: unity how to stop child moving with parent
// Make sure you assign the children in the inspector here. public Transform[] children; private void Awake () { // Sets each child's parent to null while keeping their world position. foreach (Transform child in children) { child.SetParent(null, true); } }