Did someone manage to get the Photon Viking Demo or this Tutorial(http://www.youtube.com/watch?v=f8S-x...ature=youtu.be) to work with the Character Motor and FPSInput Controller instead of the ThirdPersonController/Camera(For a First Person game)? Or someone got an other Tutorial for a FPS like game using the Photon Unity Networking Plugin? I just don’t know how to rewrite the NetworkController Script from the Tutorial above for a first person game. Which components to I need to enable/disable when using characterMotor and FpsInput Controller and the MouseLook Script(one on the PlayerPrefab, the other one on main camera) in the Network Controller Script?
A single First Person Prefab can enter a room now, but when i enter with a second one they aren’t in the same room and one of them loses the connection to the server.
The only thing i did is to attach the first person prefab to the Game manager code and attach the Photon view and network code to the prefab(and attach the network code to photon view Observe). Then I changed the code in the network code to:
public class ThirdPersonNetworkVik : Photon.MonoBehaviour
{
MouseLook cameraScript;
CharacterMotor controllerScript;
FPSInputController controllerScript2;
void Awake()
{
cameraScript = GetComponent<MouseLook>();
controllerScript = GetComponent<CharacterMotor>();
controllerScript2 = GetComponent<FPSInputController>();
}
void Start()
{
//TODO: Bugfix to allow .isMine and .owner from AWAKE!
if (photonView.isMine)
{
//MINE: local player, simply enable the local scripts
cameraScript.enabled = true;
controllerScript.enabled = true;
Camera.main.transform.parent = transform;
Camera.main.transform.localPosition = new Vector3(0, 0, 0);
Camera.main.transform.localEulerAngles = new Vector3(10, 0, 0);
}
else
{
cameraScript.enabled = false;
controllerScript.enabled = true;
}
controllerScript.SetIsRemotePlayer(!photonView.isMine);
controllerScript2.SetIsRemotePlayer(!photonView.isMine);
gameObject.name = gameObject.name + photonView.viewID.ID;
}
and paste this in both the CharacterMotor.js and FPSInputController.js
When I build the game I get the following error message:
Instance of PhotonViewInspector couldn’t be created because there is no script with that name.
UnityEditor.HostView:OnGUI()
I hope somebody can help me to set up a simple First Person game(just moving around with the characters).