Skip to content

Instantly share code, notes, and snippets.

View Figarist's full-sized avatar
🏠
Working from home

Figarist

🏠
Working from home
View GitHub Profile
@RyanNielson
RyanNielson / TrackTargets.cs
Created March 30, 2014 20:15
A orthographic camera script for Unity that keeps all targets in frame by adjusting orthographic size and camera position.
using UnityEngine;
public class TrackTargets : MonoBehaviour {
[SerializeField]
Transform[] targets;
[SerializeField]
float boundingBoxPadding = 2f;