- Home /
How to transform children of an object?
I'm trying to give all children of an object a random offset on the Y axis. However my code results in the object of itself to be transformed.
I add all children to a list and after this I loop through the list using the for each loop.!
The objects I want transformed are: HexaPillar. The object that transforms is: Pillars The script sits on Pillars
Answer by Magso · May 07, 2019 at 04:39 PM
Line 26 is moving the parent. You need Offset_Pillars[n].transform.position
Your answer
Follow this Question
Related Questions
Rotate Parent using Child as Pivot 0 Answers
How to move the parent object to a child of one of its children? 2 Answers
Destroy just the last child from a parent after the child hit a trigger 0 Answers
How to move the parent object to a child of one of its children? 1 Answer
Multiple Cars not working 1 Answer