RPC method won't execute!

Hi I am trying to call a RPC method via this
if(PhotonNetwork.isMasterClient) { //if server host
				SendMovementInput(lastClientVInput, lastClientHInput, lastClientVerticalVelocity);
			} else if(PhotonNetwork.isNonMasterClientInRoom) {
				Debug.Log("is a client, should fucking god damn move");
				this.photonView.RPC ("SendMovementInput", PhotonTargets.MasterClient, lastClientHInput, lastClientVInput, lastClientVerticalVelocity);
			}

RPC Method
[RPC]
	void SendMovementInput(float HInput, float VInput, float verticalVelocity) {
		Debug.Log("move client");
		serverCurrentHInput = HInput;
		serverCurrentVInput = VInput;
		serverCurrentVerticalVelocity = verticalVelocity;
	}


I am not getting any errors at all. There is a PhotonView attached to the game object. It just doesn't execute when I use the RPC. This is my first time really trying to make a multiplayer game so I am quite new to networking. So I am sorry if I look like a newb!

Thanks for any help!

Comments

  • This will let any client except the master send a RPC to your master client. The master client will also call SendMovementInput locally with last client input as well. The order of parameters is different in the direct call than in the RPC-call.
    They might override each other?

    You did call CreateRoom / JoinRoom to get 2 clients in the same room, right?
    Remove the direct call and check if the RPC causes the log output to show up.
  • Hey thanks. That was it. I removed the direct call and it worked!