Bummer! This is just a preview. You need to be signed in with a Treehouse account to view the entire video.
Start a free Basic trial
to watch this video
An orbit camera script will allow a camera to move in circles around an object. In the update method of this script, we're going to rotate the camera around a transform and then make sure the camera is also still looking at that transform.
Unity Documentation
-
Transform.RotateAround() - The
RotateAround()
method on theTransform
class will rotate an object around a point in 3D space. -
Transform.LookAt() - The
LookAt()
method on theTransform
class will rotate the transform so that it points at a target vector.
Resources
- Cameras in Unity - Project Files - This is a zip file that contains the Unity project for this course. Download the file, unzip it, and then in your file browser (Finder on OS X and Exporer on Windows) navigate to Cameras in Unity > Assets > _Scenes. Finally, choose the scene you'd like to open.
You need to sign up for Treehouse in order to download course files.
Sign up