- Home /
camera position
I already had my camera on a top-down position. I wanna change it position to be something like the camera view of warcraft. Can you give me some codes on how to do this? here is my code as of the moment:
//attach a top down camera
var fixedPositionObject : Transform;
//y value of camera
var heightOfObject = 5;
function Update () {
//keep camera following player at specified height
fixedPositionObject.position = Vector3(
transform.position.x,
heightOfObject,
transform.position.z
);
}
For the record, do you know about the handy "camera follow" script which is included for free by Unity? Look in your menus for it as a component ...
Answer by Prabir · Oct 22, 2012 at 11:06 AM
Hey why don't you use smoothfollow script that is already included with unity project. There you can also set height as you wish :)
Your answer
Follow this Question
Related Questions
Camera movement and gun follow in unity 1 Answer
Camera follow a sphere which look at another object on the ground 0 Answers
Camera gets stuck when cursor is locked 0 Answers
Free camera look question 2 Answers