You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
613 B
C#

5 years ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraController : MonoBehaviour {
public Networking networking;
5 years ago
public Transform player;
// Start is called before the first frame update
void Start() {
networking.Connect();
5 years ago
}
// Update is called once per frame
void Update() {
networking.CheckForMessages();
5 years ago
if (player) {
transform.position = new Vector3(player.position.x-1, player.position.y+4, player.position.z-8);
5 years ago
transform.LookAt(player);
}
5 years ago
}
}