25 lines
537 B
C#
25 lines
537 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class CameraMovement : MonoBehaviour
|
|
{
|
|
public Vector3 myPos;
|
|
public Transform myPlayer;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
Vector3 futurePosition = new Vector3(myPlayer.position.x + myPos.x, transform.position.y , myPlayer.position.z + myPos.z);
|
|
|
|
transform.position = futurePosition;
|
|
}
|
|
}
|
|
|