mirror of
https://github.com/ConjureETS/Labo_2_equ_2_a15.git
synced 2026-03-24 09:31:07 +00:00
19 lines
410 B
C#
19 lines
410 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class CameraBehavior : MonoBehaviour {
|
|
|
|
public GameObject player;
|
|
private float zAxis;
|
|
|
|
// Use this for initialization
|
|
void Start () {
|
|
zAxis = gameObject.transform.position.z;
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void LateUpdate () {
|
|
gameObject.transform.position = new Vector3(player.transform.position.x, 0, zAxis);
|
|
}
|
|
}
|