changing the pivot/rotation point by script

hi folks!

I want to change the rotation point of a parent gameobject. i create some planes and parent them in one object by script. how could I change the pivot/rotation point by script to the center of the bounding-box of the parent gameobject?

thank you!!

You can use Transform.RotateAround for that:

function Update() {
    transform.RotateAround (point, axis, angle);
}

and BoxCollider center:

http://unity3d.com/support/documentation/ScriptReference/BoxCollider-center.html