- Home /
parent object rotate with child camera
I have my main camera as a child of a child object,
parent -> child -> camera
What I want to happen is for the Y rotation of the parent object to match the camera in a smooth animation.
How would I accomplish this in C Sharp?
What do you mean exactly? When camera rotates on Y, you want parent to rotate on Y? As camera is rotating about its local Y axis, you want parent to rotate about its own local Y axis (which will move child and camera about parent at the same time as a side effect of this script)? You will need to provide a better description of what you want before anyone will be able to understand and answer your question.
Answer by 1337GameDev · Jun 16, 2012 at 04:03 PM
If you want Rotations look at Transform in the scripting documentation. It has functions like Lerp, Rotate and such. Just get timings down and how far you want them to move and this should get you started for what you want.
Your answer
Follow this Question
Related Questions
Child affecting parent rigidbody? 1 Answer
Make a simple tree 1 Answer
How do I have a Child tell a Parent to move without the Child itself moving 0 Answers
First Person Camera not being child of the character/ Set child's rotation to global rotation 2 Answers
Need camera to follow player, but not the player's rotation. 13 Answers