How to follow a game object by camera but with a slower speed?

Hi everybody,

I have a problem. I do not want to drag a game object onto a camera so it is followed by the camera. I want to use script for camera and follow the game object by camera but with slower speed. It is actualy for 2D background scrolling. The camera follows my player so it is not moving always.

please help.

One Simple Solution is, use smoothFollow script on camera.

For that firstly import “scripts” unitypackge in your scene.

Then on camera add smoothfollow script using Add Component.

Then in smoothfollow script, there is a Target field.

In Target feild, assign gameobject that you want to followed by camera.

Alter other options from the script to match your requirement.

the easiest thing would be to translate the camera with a script using a certain speed and a box collider with the player to stop moving if OnTriggerEnter .