Skip to content
Snippets Groups Projects
Commit 141034d6 authored by weiliwu2's avatar weiliwu2
Browse files

Upload New File

parent f895d278
No related branches found
No related tags found
No related merge requests found
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraController : MonoBehaviour {
public GameObject player;
private Vector3 offset;
// Use this for initialization
void Start () {
offset = transform.position - player.transform.position;
}
// Update is called once per frame
void LateUpdate () {
transform.position = player.transform.position + offset;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment