I'm trying to set boundaries so the the camera doesn't show outside of the tilemap. My code for the camera is below. Code (CSharp): using UnityEngine; public class CameraFollow : MonoBehaviour { public Transform target; public float camSPD = 0.125f; public float xMin = -1; public float xMax = 1; public float yMin = -1; public float yMax = 1; Transform t; void Awake () { t = transform; } void LateUpdate () { float x = Mathf.Clamp(target.position.x, xMin, xMax); float y = Mathf.Clamp(target.position.y, yMin, yMax); t.position = new Vector3(x, y, t.position.z); Vector3 desiredPosition = t.position = target.position; Vector3 camPosition = Vector3.Lerp(t.position,desiredPosition,camSPD*Time.deltaTime); transform.position = camPosition; } } Any help is appreciated Edit: Solved it Code (CSharp): using UnityEngine; public class CameraFollow : MonoBehaviour { public Transform target; Vector3 velocity = Vector3.zero; public float camSpeed = 0.15f; public bool xMinEnabled = false; public float xMin = 0; public bool xMaxEnabled = false; public float xMax = 0; public bool yMinEnabled = false; public float yMin = 0; public bool yMaxEnabled = false; public float yMax = 0; void FixedUpdate () { Vector3 targetPos = target.position; // Horizontal Boundaries if (xMinEnabled && xMaxEnabled) { targetPos.x = Mathf.Clamp(target.position.x, xMin, xMax); } else if (xMinEnabled) { targetPos.x = Mathf.Clamp(target.position.x, xMin, target.position.x); } else if (xMaxEnabled) { targetPos.x = Mathf.Clamp(target.position.x, target.position.x, xMax); } // Vertical Boundaries if (yMinEnabled && yMaxEnabled) { targetPos.y = Mathf.Clamp(target.position.y, yMin, yMax); } else if (yMinEnabled) { targetPos.y = Mathf.Clamp(target.position.y, yMin, target.position.y); } else if (yMaxEnabled) { targetPos.y = Mathf.Clamp(target.position.y, target.position.y, yMax); } targetPos.z = transform.position.z; transform.position = Vector3.SmoothDamp(transform.position, targetPos, ref velocity, camSpeed); } }