Everybody but owning client sees movement
I made a new minimal project solely to demonstrate my issue. I'm having a client tell the server to move the client if a button is pressed. The thing is that the client who presses the key does not see the movement, but all the other clients (non-owning clients) can see this movement. Here's an image to illustrate:
This is all the blueprint code for the player (The player blueprint is derived from the Pawn class and contains nothing but a static mesh and a camera):
Oh and I should mention that the "ServerMove" event is in fact a "RELIABLE Run On Server" event, the event node doesn't update properly to display this. But as you can see when the event is called the proper information displays.
And this is the startup logic in the Gamemode blueprint (this blueprint also sets the Player blueprint as "Default Pawn"):
asked Jan 31 '15 at 11:55 AM in Blueprint Scripting
So I solved the problem by adding a multicast after the run on server event, but it still kind of confuses me. Here's what I did:
First off I don't understand why the other clients moved without the multicast, seems to me that only the server should be aware of the movement in that case.
And second, in the UE4 tutorial video where he uses the "Run On Server" event he doesn't use an extra multicast event to broadcast what was executed on the server. Or perhaps that's because he's running one client and one listen server, if another client were to join then that solution might not work? Video in question: https://www.youtube.com/watch?v=htdI2dh-aek∈dex=92&list=PLZlv_N0_O1gaCL2XjKluO7N2Pmmw9pvhE#t=26m59s
Follow this question
Once you sign in you will be able to subscribe for any updates here