Rotating around a parent


i have object CHILD parented to object PARENT. I'm using a script that will transform CHILDS position in and out of the cameras view (just a transform.position to coordinates on and off camera relative to PARENTs transform). But when the PARENT rotates, CHILD does not rotate around its parent. It rotates about its own Y axis (CHILD).

Can not figure this one out. Any help? i have a hunch it might have something to do with euler angles, but really not sure.


Make sure your child isn't doing something like

transform.position = somePosition;

but rather something like

transform.localPosition = somePosition;