Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FollowCamera2D : MonoBehaviour {
[SerializeField] Transform target;
private Vector3 offset = new Vector3(0, 0, -10);
void LateUpdate ()
transform.localPosition = target.position + offset;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment