I wrote a custom third-person camera script. Right now it is very simple and it works.
I changed from a rigidbody to the character controller because of jittering problems, and i dont use physics anyway.
Actually my problem is that when i am walking and the camera is behind the player it jumps closer behind him. Is there any function in the standart asset that readjusts the cam behind the player if he is running?
The problem doesnt show up when the camera is somewhere before or besides the player (you can rotate the cam 360° around him), only when the cam is behind him.
Thanks for your help
The script detects the input at the x and y axis. Then it calculates the distance between the camera and the player and set it to the maximum value if there is no object between, otherwise it reposition the camera in front of the detecting object. This all works fine if i have no character controller attached.
Final Cam Position:
There are no other functions who set the position. It is the last function who is called.