Player Movement Part 3

Bill Rislov
Dec 22, 2021

Objective: Have the camera always looking at the Player

When the Player moves through the Scene I want the Camera to always be looking at them.

First I will create a script and assign it to the Main Camera.

Open up the new script and set a reference to the Transform of the target to look at. I have set the attribute serialized field so I can assign the object in the Inspector.

Assigning the Player to the _target.

Now in the Update Method, I will set the Transform of the Camera to look at the target.

Now let’s see this in action

Happy Coding!!!!!

--

--