Double-Fine-Game-Club/bad-golf-community-edition — pull request #90 by Lokno (2014-02-22 03:11:21+00:00)
Title: Added Camera Lean

Added camera lean in response to level geometry that would clip through the camera frustum
This is togglable on the options the FollowPlayerScript.cs attached to the camera. This update pertains to Issue #36.

Camera lean works by using a sphere around the camera. If a collider that is not part of a cart collides with this sphere, the camera leans downward to look directly at the cart. If nothing is colliding with the sphere, it leans a fixed position above and behind the cart.

Also, I added AddComponentMenu command to match a similar line in SmoothFollow.js

Notes:
-SmoothFollow.js is the current selected script for the buggy camera. It is set to be removed.
-You need to manually set the buggy to use FollowPlayerScript.cs
-The cart colliders (or even the entire buggy GameObject) should be placed in the "Ignore Raycast" layer so that they don't set off the camera themselves.
-Camera Zoom may be removed.