I have a "smooth follow" type of camera like a child of my vehicle (car) gameobject. (I need that setup). The case is: like the car is the parent of the camera , the camera plays like fixed to the back of the car and the supossed smooth rotations from the smooth-follow script don't work. I have tried writing "transform.parent=null" just before all the rotation-position code in the smooth-follow script and, just after that, I use "transform.parent = car" but it has not any effect on the rotations, I mean, the camera continue like parented and fixed to the car gameobject. I want to get the smooth rotations from the smooth-follow script for the camera, but, at the same time, I need the camera to be parented to the car gameobject. Any idea? Thanks in advance.
You can try to manipulate the camera in local space, rather than world space. Try using transform.localRotation and transform.localPosition in your camera behaviour script.
Thanks Calveit but the problem was easier solved introducing a "yield" instruction before the rotation-position (for the camera) part of the code.