Hello guys ,
in the script i used i preferred to use GameObject.Find function because FindGameObjectWithTags caused compiling errors which i think is becasue I am using Unity 2017 currently. Also I saw a lot of use this function even before this project.So enjoy
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraFollow : MonoBehaviour {
//Use this for initialization
GameObject CameraArm;
GameObject Player;
void Start () {
Player = GameObject.Find("Player");
CameraArm = GameObject.Find("Camera Arm");
}
// Update is called once per frame
void LateUpdate()
{
CameraArm.transform.position = Player.transform.position;
}
}