I’m working on a basic multiplayer game where I’m using the Photon Fusion 2 and I’m added a default Prototype Runner to the game. My player’s camera works perfectly when clicked on the Start Shared Client Button.
But the Camera stops working when multiple players joins via Start Host/Client button
using UnityEngine;
public class FirstPersonCamera : MonoBehaviour
{
public Transform Target;
public float MouseSensitivity = 10f;
private float vertialRotation;
private float horizontalRotation;
void LateUpdate()
{
if (Target == null)
{
return;
}
transform.position = Target.position;
float mouseX = Input.GetAxis("Mouse X");
float mouseY = Input.GetAxis("Mouse Y");
vertialRotation -= mouseY * MouseSensitivity;
vertialRotation = Mathf.Clamp(vertialRotation, -70f, 70f);
horizontalRotation += mouseX * MouseSensitivity;
transform.rotation = Quaternion.Euler(vertialRotation, horizontalRotation, 0);
}
}
I want to make the camera work same in Start Host/Join button as the Start Shared Client button do.
Please help….
Thanks
1