Hello,
I'm trying to change the parent objects at runtime and can't seem to get the code right, When the function "DeadBalloonBack" is run i'd like the other 2 gameObjects to become children of rhinoParentBack Any ideas would be great.
var rhinoParentFront : GameObject;
var rhinoParentBack : GameObject;
var rhinoRotateModel : GameObject;
var BalloonCountBack : int = 3;
function DeadBalloonBack() {
BalloonCountBack --;
rhinoRotateModel.parent = rhinoParentBack;
rhinoParentFront.parent = rhinoParentBack;
}
I could swear i tried both of those but it didn't work for me. It works great now though, thanks for the help.
– ThumbStormthis also works in C# obj.transform.SetParent(objParent.transform);
– bbyford