- Home /
Rotating around a parent
hello,
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.
Thanks!
You should post your script, cause normally if something doesn't work what you THIN$$anonymous$$ you do is not what you are really doing...
Answer by Statement · Apr 01, 2011 at 12:27 PM
Make sure your child isn't doing something like
transform.position = somePosition;
but rather something like
transform.localPosition = somePosition;
totally nailed it. That was my problem! thanks for saving my keyboard.