UNITY - CAMERA CONTROLLER

 Code used in the video:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraController : MonoBehaviour {
  [SerializeField]  Transform player;
  float offsetX = 3.0f;
  // Use this for initialization
  void Start () {
    //player = GameObject.Find("Player").GetComponent<Transform>();
  }
 
  // Update is called once per frame
  void Update () {
    transform.position = new Vector3(player.position.x + offsetX,transform.position.y,transform.position.z);
  }
}





No comments:

Post a Comment

AI PILIPINO MUSIC

The YouTube channel  AI PILIPINO MUSIC   presents itself as a niche platform offering content that seems to span a unique blend of creativit...