So when i drag and drop a first person controller into the game it runs fine,
however when i try to instantiate the first person controller into my game
head-bob and virctical look do not function. though you can move and turn left and right…
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon;
public class SpawnPlayer : Photon.MonoBehaviour {
public ConnectPhoton ConnectPhotonCS;
public GameObject Connect;
public Transform SpawnPoint;
void Start (){
Connect = GameObject.FindGameObjectWithTag ("Connect");
ConnectPhotonCS = Connect.GetComponent<ConnectPhoton> ();
if (photonView.isMine == true) {
if (ConnectPhotonCS.PlayerOne == true) {
PhotonNetwork.Instantiate ("Player01", SpawnPoint.position, SpawnPoint.rotation, 0);
}
if (ConnectPhotonCS.PlayerOne == false) {
PhotonNetwork.Instantiate ("Player02", SpawnPoint.position, SpawnPoint.rotation, 0);
}
}
}
}