Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Ok,

You need to understand two things :

1) All of these code need to be executed into a behavior script (not in global).

2) this.actor is the actor who is attached the behavior. Exemple you create a player actor in your scene and you link the behavior "playerBehavior". In your playerBehavior script this.actor is the player Actor.

So who is the problem ? Just select player actor in the camera script. Dont forget to use class variable if you need to pass elements between awake/start/update method.

If you need more help send me code via pastebin :)