I have this finished Roll a Ball tutorial project, but the case is, that I want the camera to be able to turn around. I have this option to make the character a parent for the camera, but I can’t do that because the camera will rotate all around too then. I have a dynamic camera with the script used in the tutorial, which makes the camera follow the character back and forth, but I want it to be able, to follow the object like a SmoothFollow, like a 3rd person. Can someone explain to me how to do that? Maybe give me a sample, or post a script. Thank you
Its just a pseudo code and Camera is not child of ball:
// for position
Vector3 targetPos = ball's position - ball's velocity;
targetPos.y = 0f;
taregtPos = Vector3.Normalize(targetPos);
targetPos += offset; // offset is Vector3 for some elevation in Y or to make camera closer or far.
camera's position = targetPos;
// for Rotatation
camera's transform.lookAt( ball's transform );
// you can also add some offset to rotation here to get what you exactly want.