Skip to content

Instantly share code, notes, and snippets.

@paraya3636
Created February 2, 2018 04:45
Show Gist options
  • Save paraya3636/7de2de61b1c247eae3f0da44e88fcb7e to your computer and use it in GitHub Desktop.
Save paraya3636/7de2de61b1c247eae3f0da44e88fcb7e to your computer and use it in GitHub Desktop.
追従するカメラ
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Camera : MonoBehaviour {
public Transform target;
void Start () {
target = GameObject.FindWithTag("Player").transform;
}
void Update () {
transform.position = target.position + new Vector3(0, 1, -3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment