Skip to content

Instantly share code, notes, and snippets.

@tracend
Created March 29, 2011 23:12
Show Gist options
  • Save tracend/893543 to your computer and use it in GitHub Desktop.
Save tracend/893543 to your computer and use it in GitHub Desktop.
Unity3D: Rotate the camera every frame so it keeps looking at the target - Source: http://wiki.dreamsteep.com/Unity3d
var target : Transform;
// Rotate the camera every frame so it keeps looking at the target
function Update() {
transform.LookAt(target);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment