changing 2d smooth follow script

Hi

Im making a 2d side scrolling shooter and am using the unity 2d smooth follow script for my camera but have too much ground in the view and need to rise the camera on the y axis.

2d smooth follow script

var target : Transform; var smoothTime
= 0.3; private var thisTransform : Transform; private var velocity :
Vector2;

function Start() { thisTransform =
transform; }

function Update() {
thisTransform.position.x =
Mathf.SmoothDamp(
thisTransform.position.x,
target.position.x, velocity.x,
smoothTime); thisTransform.position.y
= Mathf.SmoothDamp( thisTransform.position.y,
target.position.y, velocity.y,
smoothTime); }

As a novice to javascript I need some help working out how to move the camera up in the script above.
If i physically pull the camera up it just goes back to its position.

Any help would be gratefully received

Thanks Folks

I’m still a novice at javascript as well…

but it appears the positioning is referencing the target which you set in the inspector.

So if you haven’t selected a target there, doing so may fix it. If you have, I suggest creating an empty gameobject and positioning it as the new target then child it to your original intended target so it moves with it. Sometimes it’s not ideal to use character models or their various parts as the actual target because any animations attached could give unwanted results in the camera. It really sounds like you may not have a target set up at all though, or are targeting the root in the waist or lower. Stick an empty gameobject about head height as the target, usually works great for me.