Hey People, ive got a very basic script for my Main camera to follow my player. im creating a 2.5D platformer and im doing allot of fine tuning atm.

here is my code

var Target : Transform; 
var distance = 5;

function LateUpdate () { 
   transform.position = Target.position + Vector3(0, distance, -30); 
   transform.LookAt (Target); 
    }

At the moment the ground/floor, takes up 50% of the screen real-estate. I want it to take up much less, is there a simple command i can use to do this? i have fiddled around with the (0, distance, -30) part but it isn’t relevant.

Any Suggestions?

[10641-screen+shot+2013-05-03+at+12.06.49+am.jpg|10641]

Your problem is the transform.LookAt(). You can move the camera up and down, but if you use a LookAt(), the camera is going to be tilted so that you character is in the center of the screen. How you solve this will depend on how you want camera to follow the character. As a start, take out the transform.LookAt() and adjust the Vector3(0,distance,-30).

I had this problem in a 3D environment and I found the solution to be to move the camera after the lookat:

`Vector3 lokat = camTarget.position;

transform.LookAt(lokat);

transform.position+=Vector3.up*0.9f;`