//Spawn children, set sizes, rotation, velocity, position. void SpawnChild() { //Get inactive asteroid instance from the ObjectPool. GameObject child = spawnerRef.getAsteroidObject(); //Set their transforms to self + small offset, change object scale. float offset = Random.Range(-childSpawnOffset, 0); Vector3 currentTransform = transform.position; child.transform.position = new Vector3(currentTransform.x + offset, currentTransform.y, currentTransform.z + offset); child.transform.localScale = transform.localScale * 0.6f; Vector3 copy = child.GetComponent <Rigidbody>().velocity; child.GetComponent <Rigidbody>().velocity = new Vector3(copy.x * childVelocityMultiplier, 0.0f, copy.z * childVelocityMultiplier); Asteroid ast = child.GetComponent <Asteroid>(); ast.spawnerRef = spawnerRef; ast.splitDepth = splitDepth - 1; ast.scoreValue = (int)(scoreValue * childScoreMultiplier); }