mirror of
https://github.com/ConjureETS/Labo_2_equ_4_a15.git
synced 2026-03-24 01:10:58 +00:00
19 lines
386 B
C#
19 lines
386 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
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;
|
|
}
|
|
}
|