Hi,
I got a basic script for my camera, which is simply tracking the character like this:
var xposition : float;
var yposition : float;
var player : Transform;
function Update () {
transform.position = Vector3(player.position.x + xposition, player.position.y + yposition, -20);
}
The problem is that if the character is jumping too high, as in outside the background limit of the game on the y-axis, the camera will obviously follow it outside aswell.
Is there a way to make the camera always stay within some kind of box limit, to prevent it from moving too high? And then follow the character again once it is inside that limit?