I’m making a multiplayer game where the players can shoot with cannons on a ship, while it is moving. When one player fires, he calls a RPC so that the fire is executed on all clients. But because the ship is moving, the cannon ball appears on the client not at the position it should be(the cannon) but far behind. Is there a way to call a RPC at the same time on all clients and the one who sends it? RPCMode.All just seems to execute the methode on the one who sends it, instead of sending it to the server and then back again(the server is dedicated, i use photon cloud). Or is there a better way to solve this?
fortunately the answer is (relatively) simple
there is a massive explanation here:
Look at the BOTTOM of the RPC manual page. This is explained in great detail in the link. You must use the “normal, one destination” version of the RPC call.
Say you have 5 iPads connected. One is your “boss” iPad and the other 4 are puppets. Of course, the “boss” keeps a list of the other four.
So, just send to the other four. (Using the normal, “one destination” RPC call.) so, you’d just have a loop or whatever and you’d use that call one time each for the four puppets.
“When one player fires, he calls a RPC so that the fire is executed on all clients” No, the “boss” iPad always tells all the others what to do. Enjoy!