Created
February 2, 2018 04:45
-
-
Save paraya3636/7de2de61b1c247eae3f0da44e88fcb7e to your computer and use it in GitHub Desktop.
追従するカメラ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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