hello guys i am creating a small PUN game but i have this problem when i conect to room i dont control my player but i control one of the others players
This is my PLayerMove Script :
using UnityEngine;
using System.Collections;
public class PlayerMove : Photon.MonoBehaviour
{
public float WalkingSpeed = 10f;
void Update()
{
if (photonView.isMine)
InputMovement();
}
void InputMovement()
{
if (Input.GetKey(KeyCode.Z))
GetComponent<Rigidbody>().MovePosition(GetComponent<Rigidbody>().position + Vector3.forward * WalkingSpeed * Time.deltaTime);
if (Input.GetKey(KeyCode.S))
GetComponent<Rigidbody>().MovePosition(GetComponent<Rigidbody>().position - Vector3.forward * WalkingSpeed * Time.deltaTime);
if (Input.GetKey(KeyCode.D))
GetComponent<Rigidbody>().MovePosition(GetComponent<Rigidbody>().position + Vector3.right * WalkingSpeed * Time.deltaTime);
if (Input.GetKey(KeyCode.Q))
GetComponent<Rigidbody>().MovePosition(GetComponent<Rigidbody>().position - Vector3.right * WalkingSpeed * Time.deltaTime);
}
}
In Photon View :
Owner Set at Run Fixed
View Id Set at Runtime
Observe options off
Transform Serialisation ALL