Home
camera
scripts
Unity2d
Unity 2d Camera Follow Script


Today i am gibing you very simple yet cool Unity 2d Camera Follow Script with smooth follow and other useful options.
Very easy to setup just add this script to your camera and then drag your character or anything you cant to follow into the script's target field, Like i added character in this field, finish :)

Script is here or get it from github.





Blog authors

2 comments

  1. Rafael
    Rafael
    June 2, 2016 at 10:35 AM
    I have a weird problem, when I attach to my camera, and add to the target my player... the camera zoom to my player and don't stop.. zoom to the infinite hahahah .. any clue for what is happening?
  2. Mark
    Mark
    March 29, 2016 at 3:28 PM
    target = GameObject.FindObjectWithTag("Player");