- Home /
Camera won't follow character
trying to get the main camera to follow 3rd person above my character from above and behind, so I can look around with cursor and NOT have the camera follow where the player is looking/facing (trying to get character to face the cursor and not have the camera rotate)
Cool thanks guys this really helps. I see what you're saying. Awesome work, good job, this was really annoying me!
$$anonymous$$udos to you, Gnometech and jg2115
Answer by Gnometech · Feb 02, 2014 at 07:09 AM
What you need to do is to create a camera script that gets a reference to the player object. In the Start() routine you save the distance vector to the player in a private Vector3.
In UpdateLate() you adjust the camera position to player position and add the distance vector. This will keep the distance constant and leave the orientation of the camera untouched.
A code example can be found in the tutorial project "Roll A Ball": http://unity3d.com/learn/tutorials/projects/roll-a-ball
See lesson 103.
Answer by jg2115 · Feb 02, 2014 at 06:56 AM
In the scene view just change the position of the main camera to where you want it to be, and make it a child of the player.
This will not work, the camera will rotate along with the player object, which is not the desired behaviour.
Your answer
![](https://koobas.hobune.stream/wayback/20220613132319im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Problem in rotating camera around a moving player 1 Answer
Rotate camera a set amount of degrees around Player 0 Answers
FPS cam for Roll -a-Ball like game 1 Answer
how to make my bones follow the camera(FPS) 0 Answers
Camera Rotation Lock 0 Answers