- Home /
How to make the camera follow the character like in e.g. tomb Raider ?
I have a small script that uses Character Controller to move the character on the scene and now I would like to make the camera follow the character like in Tomb Raider or other third person perspective game.
How can I do this ? How can I access other object's position and rotation (camera) ?
Answer by Jessespike · Oct 27, 2012 at 11:12 PM
You can access the main camera's transform like this: Camera.mainCamera.transform (Followed by .position or .rotation)
To access other objects, you'll need a reference in the script. http://unitygems.com/script-interaction1/. To get the camera to behave like a Tomb Raider one will have to be up to you. Unless someone is aware of a similar script lying about.
Your answer
Follow this Question
Related Questions
Camera stucks at the spawn position 1 Answer
Panning camera based on a fixed point. 0 Answers
Camera Rotates Incorrectly 2 Answers
Camera movement according to rotation and actual position RTS 1 Answer